This reduces jitter in the WifiTracker and is modeled after a prior
broken implementation which attempted to half-life the rssi each time
AccessPoint.update(ScanResult) is called.
Bug: 34774783
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: Iab3f9914af40f2fd56e8ae7b45dcbd62176c8a67
This CL adds the APCT tests within this project to
a similar suite as CTS known as device-tests.
The current method of running APCT tests in the infrastructure
is unaffected.
Bug: 35882476
Test: `make dist device-tests -j` and local builds of
continuous_instrumentation_tests & continuous_native_tests
Change-Id: Ifa382fe691842c1cd76897775b9e2a1653449eb5
Changed previous getRssi method to updateeRssi in order to clarify
process, and also changed logic to return current mRssi when the given
AP is active. mRssi is set directly from WifiInfo for active networks.
For non-active networks we return the highest Rssi for any recently seen
BSSID (multiple APs with the same SSID are grouped together).
Change getSeen to updateSeen for consistency, although seen is never
used anywhere.
Also fixes b/34889252.
Bug: b/36077865
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: Ic52df41b8eb317e83d835c745b404007a53cf5d7
- change the sort to first compare priority, then compare package name.
- do not normalize the tile's priority for all package.
Change-Id: I5501a8c3d5ca0a7f9e100411348d28cfe373c87a
Fix: 35928954
Test: make RunSettingsLibRoboTests
(cherry picked from 76e319f015c2b43498ce3ce610a253d63e76cbf3)
Some additional internal only refactorings were done as well.
Bug: 32912773
Test: make checkbuild
Change-Id: I96e3da967fad731fc8f39bde9db95f50ab7353fb
Add a Builder class to make testing easy and clean.
Add unit tests to enforce the sorting order that we want.
Refactor some compareTo() internals to use existing methods rather than
duplicating functionality.
Refactor isReachable() functionality to a new method.
Update tests to use Truth assertion library.
Test: Run local AccessPoint unit tests:
adb shell am instrument -w -e class
com.android.settingslib.wifi.AccessPointTest
com.android.settingslib/android.support.test.runner.AndroidJUnitRunner
Bug: 35042429
Change-Id: I7c8a1ca69800f62e1fb13141e58b4e52b2bc3d70
This fixes a UI issue where the Tracker first displays the connected
accessPoint as inactive before processing the connected state, which
causes the list to jump around.
Also add useful debugging information to AccessPoint toString.
Bug: 35681450
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I9a8356cfdd2e5be2da58ce5de82e228fddf301f9
The ContentProvider queries in updateTileData are not being used, and
adds extra latency. Queries are performed later in Settings to get the
freshest data.
Bug: 35708630
Test: make RunSettingsLibRoboTests
Change-Id: I3798af0a89ed7261cfa4ebec4fada077495034ed
They were all broken in that they returned profile admins for parent
queries even when they clearly shouldn't.
Examples:
- disable unredacted notifications
- disable fingerprint
This doesn't seem to have been tested beyond the bare basics of one
user with one device admin. Added some reasonable coverage. It could
still do with more.
Test: make RunSettingsLibRoboTests
Bug: 34929375
Change-Id: I1b0e986056ffa62d47091c0010977ac810ebd690
The statusLabel shows the current status of the battery(i.e. not
charging, charging).
Bug: 35328749
Test: RunSettingsLibRoboTests
Change-Id: I5be13635be9b2749c0c62edeb1e0ac17ff423d83
Building with coverage enabled pushes SettingsLibTests over the dex
limit, enable multi-dex.
Test: builds
Change-Id: Ia72db71a2e46e2fdc8cf3e5484f122fa985f25c7
PreferenceScreen.remvoePreference() only removes top level preference in
the preference screen. When we try to remove preference inside a
preference category, it will fail. Add handling to recursively find
the preference and remove it directly from its parent instead.
Change-Id: Ib33efe0b716db2366d712ce1d1eb8b5e33a4683a
Fix: 35365702
Test: make RunSettingsLibRoboTests
Bug: 35098444
Test: new test added in ApplicationsStateTest.java ; run it by doing the
following commands:
make SettingsLibTests -j40
adb install -r $OUT/data/app/SettingsLibTests/SettingsLibTests.apk
adb shell am instrument -w com.android.settingslib
In Settings->Apps&Notifications->Apps, the list of filters before this CL is:
All | Enabled | Disabled
With this CL, the filter list becomes:
All apps | Installed apps | Disabled apps | Instant apps
Change-Id: Ia2ec099f758901839a2aa84fe155ae032990092f
This is a non-functional refactor. The old enums will be removed once
ag/35323372 is addressed.
Bug: 35114358
Test: Ran existing tests (see files touched).
Change-Id: I08fd8c7964463b5908ce361e61f8fe811d0ff6f3
The same application can run as either an instant app or an installed
app. Store this setting per-user instead of based upon the install
location.
Bug: 25119046
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Iff565bb1ac10d631499f0bd0f69b401cb073c10e
Before the cache unregistration logic was posted to the worker thread.
However, when WifiSettings is quit, the onDestroy method immediately
kills the WorkHandler. This caused unregistration to never occur, which
left the cache registered and the listener to try to post work on the
dead worker thread. The cache is now registered and unregistered
serially in start and stop tracking, respectively. Furthermore, the
cachelistener is running on the mainHandler as it is a lightweight task
(posting to work handler).
Bug: 34891717
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I7739fdbe036be5b2870be45f33f670fd69d69af1
The icon on app header is a clone of original app icon, which relies on
getConstantState() of the orginal drawable non-null.
Change-Id: Ice5360f5d00d99b3cfe538b167ce67fc06d5e402
Fix: 34190136
Test: make RunSettingsLibRoboTests
In Settings, we also need a BatteryMeterDrawable to show battery meter,
that's why I move it to settingslib.
In this cl, what I have changed is listed below:
1. Create BatteryMeterDrawableLib that contains logic of battery
drawing.
2. Still Keep the battery control logic in systemui.
3. Remove hardcoded battery color by using the color state lists.
4. Move some tests to settingslib
Bug: 34771849
Test: make SettingsLibTests
Change-Id: I39c0f0e31ca5e1b958467298db1d0590d16c9f6d
Since we are combining Language & regions and Input and gestures in
System settings, we don't need 2 separate category keys.
Bug: 34976047
Test: make RunSettingsLibRoboTests
Change-Id: Ic11bfb5e4e373a3499772b1d4654187749197899
match the Optional Steps fliters in setup wizard.
Also added some more logging.
Bug: 34460278
Test: cd tests/; mma
Change-Id: Id576a1a19daa473e203cef41d67f6ef0cfc06dbe