Commit Graph

115 Commits

Author SHA1 Message Date
Patrick Rohr
33118abaa9 Merge cronet sample app into Development app
So we have a way to play with the android.net.http APIs.

This is essentially copied from
https://source.chromium.org/chromium/chromium/src/+/main:components/cronet/android/sample/
with minor modifications to support android.net.http APIs (mainly,
renaming APIs and working around the fact that apihelpers are not
available to apps).

Test: adb install -r $OUT/system/app/Development/Development.apk
Change-Id: I8fdb2f64f110551edd39fab074abaf84e76b010f
2023-06-27 16:09:01 -07:00
Sekyeong
4a9a733d6b Add FLAG_IMMUTABLE in DevTools app
Happened IllegalArgumentException on DevTools app.
  package : com.android.development
Because PendingIntent requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE.

Test : DevTools - Connectivity - press START SCREEN TOGGLE button

Change-Id: I998c74f974d8f555e8016b2a319e1a9a4a4f2669
Signed-off-by: Sekyeong <sekyeong.heo@samsung.com>
2023-01-11 13:02:51 +09:00
Cole Faust
f4dc2d5f25 Add FLAG_IMMUTABLE to PendingIntents
If your app targets Android 12, you must specify the mutability of each PendingIntent
object that your app creates. This additional requirement improves your app's security.
https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability

Android Lint is being updated, and adds an error-level check for this.

Bug: 247885568
Test: Presubmits
Change-Id: I2bb91d98b443af2b5c16944ce197d863dbd33f9a
2022-09-23 15:17:52 -07:00
Lorenzo Colitti
fa83a254da Add logging for Ethernet callbacks.
Test: manual
Change-Id: I2fc92895ec59f616715673d3141fc0fb19f7585b
2022-02-10 11:57:47 +09:00
Chiachang Wang
03a2b4336b Resolve hidden connectivity dependency
ConnectivityManager and NetwokUtils are parts of incoming
Connectivity mainline module. The hidden methods or members are
no longer accessible outside the module. Caller should either
remove or replace the usage.

The override hidden callbacks and INET_CONDITION_ACTION intent
are not really used in the code. Remove the unncessary usage.

The network id is a part of Network.toString(). The network id
is also not necessary.

Bug: 182859030
Test: m
Change-Id: I3a75afb86f5b60ea530b50771bd76887ccf9f271
2021-04-09 06:45:54 +00:00
David Su
6e08a584fb Migrate to official API getWifiActivityEnergyInfoAsync()
getControllerActivityEnergyInfo() is an @hide API,
migrate to getWifiActivityEnergyInfoAsync() which is an
@SystemApi.

Bug: 145244073
Test: m Development && adb install Development.apk,
open Dev Tools app, go to Connectivity page, tap on
Link Stats button, ensure link stats printed in text
box below.

Change-Id: I0a9edfff7d924a31c5a3470a89e03bd161f1a8fb
2019-12-04 16:36:03 -08:00
David Su
3c48b7354e Move WifiActivityEnergyInfo to android.os.connectivity
Fix import of WifiActivityEnergyInfo to package
android.os.connectivity

Bug: 145244073
Test: compiles
Change-Id: Ibe16e826bde9017df989e12289b2961a18fab281
2019-12-03 22:31:24 -08:00
Steven Moreland
c33f3327aa Merge "Remove unused import of ServiceManagerNative." am: 9958d0da90
am: 9a67b9d69e

Change-Id: Ibedc16800360be966fb3e47a802f58147775c461
2019-06-22 17:14:15 -07:00
Steven Moreland
bdc5faa067 Remove unused import of ServiceManagerNative.
Bug: 135768100
Test: N/A
Change-Id: Ieb11d0a7b083ba2518047596241d31887f81a916
2019-06-21 15:37:20 -07:00
Lorenzo Colitti
50445e3e1c Merge changes I1b9dc4d5,I44da96fa am: ee0870d0a2 am: c9ba8a847a
am: fe82e6eba4

Change-Id: Ib0d38141c3313becb1e6329113fd2cac15bc5ed5
2018-10-01 21:13:14 -07:00
Lorenzo Colitti
223fc59aca Log broadcasts in DevToolsConnectivity.
Test: manual
Change-Id: I1b9dc4d56b56dae5da779aec1d99cd7190e94a4e
2018-10-02 10:20:33 +09:00
Lorenzo Colitti
2b9b9b44be Add OWNERS for the connectivity page in the Dev Tools app.
Test: ../../../build/make/tools/checkowners.py src/com/android/development/OWNERS
Change-Id: I44da96fa7daaa6fcd0033797a7ca3f633509364b
2018-10-02 10:20:33 +09:00
Roshan Pius
d109cfc821 Development: Remove unused param in getControllerActivityEnergyInfo
Bug: 34076874
Test: Compiles
Change-Id: Ib537d7cf75868abc9b6aeff4eb85697aa1dc880a
2018-07-20 09:37:15 -07:00
Weilun Du
f11e49ee42 Fixed the bug where there are multiple developer options
BUG: 69679218

Change-Id: Ib44bf9441ecc7378d810cb55e5d9acdedbde99d6
Signed-off-by: Weilun Du <wdu@google.com>
2017-12-01 17:59:56 -08:00
Sudheer Shanka
5b6205978e Update usage of ActivityManagerNative.
Bug: 30977067
Test: N/A
Change-Id: If76488d9e7b1a33f7f5c9d65eb9254d126ef02b6
2016-11-11 15:01:34 -08:00
Svet Ganov
0d12f27537 Update app using changed private API.
Change-Id: Iced526a2392c7600fe9811dec5b2d1d804aa9610
2016-08-24 07:46:12 -07:00
Evan Birenbaum
a1770e75d0 Make the DevTools Connectivity lock non reference counted.
To avoid a race on checking if the lock is held.

Change-Id: Iee836447ab0cf6586fa8ece570cc821cd7c6fcd4
2016-06-24 16:08:29 +00:00
Evan Birenbaum
2817836d75 Fix a crash when exiting the DevTools Connectivity page.
A lock was being released without checking if it was held, which
resulted in a crash because WifiManager.MulticastLock is reference
counted by default.

BUG=28668604

Change-Id: I306731129894d5525e974561c2680ae7db5aff4b
2016-05-24 03:36:25 +00:00
Joe Onorato
795b407460 Add exponential broadcast flood to the BadBehaviorActivity.
Bug: 28196243
Change-Id: I26eb8d5f7f9bcc90bfe5aa52f3d61a44b6105006
2016-04-20 15:44:02 -07:00
Paul Jensen
0991017843 Control WifiManager.MulticastLock from connectivity dev app
Add buttons to acquire and release the WifiManager.MulticastLock.

Change-Id: I28fd7743cb3adfeec055b6bcce2c8128b15cf2d3
2016-04-04 23:51:46 +09:00
Vince Harron
d1731fc950 Fix for IllegalMonitorStateException in Cache Abuser
AsyncTask.wait was being called outside of a synchronize block,
causing an IllegalMonitorStateException.  This replaces the wait
with a Thread.sleep.

BUG=b.android.com/203846

Change-Id: Ib370f702c1e0f76657292955de2406ce7f065e69
2016-03-18 16:40:49 -07:00
Lorenzo Colitti
503abedac9 Change the Development app to use a lambda.
This is a cherry pick and modification of
commit 17f05f5820.

Bug: 26753820
Change-Id: I55419fac85196d86d548d455880d897015d8ea84
2016-03-11 10:31:35 +00:00
Dianne Hackborn
952cb1f15a Fix issue #27385109: control activity behavior without triggering...
...isUserAMonkey for testing purpose

Change-Id: If261bc860d3974796ec382dcd5f625d40ab093a5
2016-02-29 15:15:05 -08:00
Ian Pedowitz
3f63f35fbe Revert "Upgrade the Development app to 1.8, and use a lambda."
This reverts commit 17f05f5820.

Change-Id: Idc8259a5a2fd209c19a6f548ddf8b1a09ed33966
2016-02-18 16:45:52 +00:00
Lorenzo Colitti
17f05f5820 Upgrade the Development app to 1.8, and use a lambda.
Change-Id: Ifa3836a3c5fc36a1932ea0d841e412ef238fb4bb
2016-02-18 22:23:58 +09:00
Lorenzo Colitti
0c87eb6453 Display a progress bar when a network is being brought up.
Change-Id: I5d2c14ffc6010d29ffb832cb924c6b0108fd0048
2016-02-18 16:15:39 +09:00
Lorenzo Colitti
0b3999da19 Add the ability to file a NetworkRequest for TRANSPORT_WIFI.
Change-Id: I3a2cbdbcb94a6d63e853f2dc87ed0ef737620684
2016-02-18 14:13:19 +09:00
Lorenzo Colitti
fd99d399e5 Improve the Connectivity section of the Dev Tools app.
1. Remove one more usage of startUsingNetworkFeature.
2. Use new APIs for bound HTTP requests.

Bug: 25824776
Change-Id: Ic2f30ce9ffc873be198f6ad29cf928dc33574d84
2016-02-17 12:09:09 +09:00
Lorenzo Colitti
29b766e122 Add the ability to request SUPL neworks.
Also:
 - Refactor the code to remove duplication and make it easier
   to add/change the network buttons.
 - Make the MMS network request specify TRANSPORT_CELLULAR as
   well, since that's what the system MMS service uses.

Change-Id: If8e2ca1ae22b3da3fffb0593fbb93a1d479143f3
2015-11-27 19:25:54 +09:00
Lorenzo Colitti
6553b85a96 Remove the crash button from the dev tools connectivity app.
A button that throws an NPE isn't very useful when you can just
swipe the app away from recents.

Change-Id: I62ecfc6f3f4e02a3f9830409ac6a2793eff6a7c1
2015-11-21 21:58:18 +09:00
Lorenzo Colitti
28bb8be0da Update the Connectivity debug app to the multinetwork API.
1. Stop using the deprecated startUsingNetworkFeature and use
   requestNetwork instead.
2. Make use of clearCapabilities().

Bug: 23597341
Change-Id: I65cb813111947d159d2bb18f0d8a93fb726912e5
2015-10-22 08:42:37 +09:00
Lorenzo Colitti
e149ffe2e9 Add network callback logging to the Connectivity app in dev tools.
Change-Id: I6027db6330bca7c8bce1b405c0972690e8db77d9
2015-05-18 23:37:22 +09:00
Pierre Vandwalle
c84e7b11e5 add wifi power calculation
Change-Id: I3176d835454b1324403b844d075709ba277a7189
2015-03-24 19:40:32 -07:00
Lorenzo Colitti
8501840869 Add a button to the debug app to call reportBadNetwork.
Bug: 18777225
Change-Id: I964f3deb60ea509dfb647a01d2b7b357dd47209b
2014-12-17 14:22:11 +09:00
Dmitry Shmidt
d00a0a734e Development: Connectivity: Fix receiver leakage
Bug: 18229332

Change-Id: Iadd8a1a6e72cf762f6494b586b53b827edebd25d
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2014-11-03 17:26:00 -08:00
Dmitry Shmidt
4bef5c56f8 Connectivity: Add current scan amount notification
Change-Id: I717926f804d7e13192b80e59019310dc63cc0df8
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2014-06-12 13:47:34 -07:00
Sreeram Ramachandran
732d646f51 Use the updated RouteInfo API.
Bug: 15142362
Bug: 13885501
Change-Id: I97f1625e037c889b0cddd3db418c42c1d48b26b9
2014-06-06 14:51:59 -07:00
Narayan Kamath
01347d965e am 361fce55: am d9fb901d: am 479cf9ff: Merge "Track changes to IActivityManager.startInstrumentation."
* commit '361fce55866e220380fdf1c81f29e5498b5fa0a7':
  Track changes to IActivityManager.startInstrumentation.
2014-05-30 11:50:55 +00:00
Narayan Kamath
fc9e3f6878 Track changes to IActivityManager.startInstrumentation.
Change-Id: Iceaecb720c2824134a1d6d13b1f3e0a16d41d76d
2014-05-30 11:33:02 +01:00
Sreeram Ramachandran
b24ff8773d Update the Dev Tools app to the new route add/remove API.
Cherry-pick of:
https://googleplex-android-review.git.corp.google.com/#/c/450447/

Change-Id: I629123567c907f0979e44998ef8d828b47059ec0
2014-05-14 12:26:23 +00:00
Vinit Deshapnde
9bfdb7e110 Expose WifiManager.setTdlsEnabled public API
Bug: 10221775

Change-Id: I559e4a2afd525a03c8a13fd151eca4638426d03e
2013-08-16 17:20:45 -07:00
Dmitry Shmidt
81253bc376 Connectivity: Add IP config to TDLS test
Change-Id: I70096a042faaacdaeed7d6aae16a95704202ef1d
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-07-19 15:55:35 -07:00
Dmitry Shmidt
47a5a18431 Connectivity: Add TDLS test
Bug: 8539031

Change-Id: I68e9e2e93d49f29ed915a462570cb8e782e9a4f2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-07-18 16:32:30 -07:00
Dmitry Shmidt
36b2c791ee Connectivity: Add logs to Wifi Scan test
Change-Id: Iae13a841c01ee00970c0b08d57b16cad08832ff9
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-05-22 13:19:00 -07:00
Dianne Hackborn
cb8739c53f Debugging help for issue #8734824: WATCHDOG KILLING SYSTEM PROCESS
The monkey now gets told about system hangs, and does stuff about
it!  Most especially, it can collect a bug report.  Monkey wins!

Change-Id: Ic8350721e715ef21d1ec813c6aff9a83262d5faa
2013-05-06 11:16:34 -07:00
Elliott Hughes
d4f9f64beb am 2cb06fc1: am a6eaa197: Merge "Remove dead code that\'s keeping other dead code in frameworks/base alive."
* commit '2cb06fc1f079bf089ff7dfd2844b5c0935bcc1d3':
  Remove dead code that's keeping other dead code in frameworks/base alive.
2013-03-22 19:02:25 -07:00
Elliott Hughes
45b42d6c05 Remove dead code that's keeping other dead code in frameworks/base alive.
DateUtils.writeDateTime is @hide, @deprecated, was never in an API level,
but is currently kept alive by this dead code.

Change-Id: Ibafbd39113a7c505ba8ab8e93e6b526505e5eaf1
2013-03-19 11:49:22 -07:00
Dmitry Shmidt
6420ac2c74 Connectivity: Add Wifi Scan test
Initial Revision

Change-Id: I6bf5f65f877980ab889e6d08f206cd9c99e5338c
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-03-11 11:35:58 -07:00
Svetoslav Ganov
00fc93c6fe Refactoring due to removing some private APIs.
Change-Id: Id00d9fa974d8cb747cebb99c5a64ed5b438b56e9
2013-01-23 00:20:07 +00:00
Dianne Hackborn
9da0812284 More on issue #7318666: hide developer options from user build
The Dev Tools app now tries to add a link to Development Settings
at the top of its list.

Also add a new "Development Settings" app that directly takes you
to the development settings activity, as a stand-alone app that
could be distributed as a regular third party app.

Change-Id: I8fe2b6a32cf4e37d69f4ce7b8d646a147b492d99
2012-10-10 19:01:09 -07:00