The injected tiles code currently treats the string metadata value
for the title key in the Activity's manifest as the title itself.
When the language on the device is changed the title remains in the
previous language until a reboot.
This CL will make injected tiles attempt to treat the string metadata
value as a resource variable to get the integer res id and then
properly load the localized title using the res id. To be backwards
compatible, if the res id is 0, we treat the string metadata value as
the title itself (current behavior).
Bug:36470694
Test: make RunSettingsLibRoboTests
Change-Id: I3963534a3a3a27d0455c4ed1ad4fa574b03d67fc
This toggle is used to decide whether to show charging method.
If it is off, then "Charging over ac" will become "Charging"
Bug: 36558216
Test: RunSettingsLibRoboTests
Change-Id: I98b1f7e7b77d7ce0a7e1aae29e55a33ac79ff0d7
(cherry picked from commit b3c33f63ed120cf4758ec67426bb45291e289fce)
Adds a new filter that includes downloaded and launcher apps, as well
as instant apps, and ensured that instant apps do not appear where
they previously were not expected (downloaded and launcher apps).
Test: Added testing for the existing filter and the new one.
Bug: 36515324
Change-Id: I7ef94442bae14ee18d4b4d70f04f9bf62af9eff8
(cherry picked from commit a4e0356ed48021c353a6964ec8ea4c6b55006282)
The configurations that are managed by "Saved Networks" page are
centered around the abstraction of AccessPoint. Since we will
need to manage Passpoint configuration in the "Saved Networks"
(for configuration removal), encapsulate necessary information
in an AccessPoint for a Passpoint configuration.
Bug: 34207710
Test: manual test
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: Ide556f5ec6c4ef9e1f82016efe17dc9860f298de
On a device with Passspoint disabled (config_wifi_hotspot2_enabled build config
set to false), calls to WifiManager#getMatchingWifiConfig will throw
an UnsupportedOperationException. So add a test to verify that exception
is being caught in WifiTracker#udpateAccessPoints.
Bug: 36649203
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: If7d3d4122c36b1b98c24abf703d6492771918125
Recently mockito has been updated to version 2.7.* and any(*.class) will now
reject null values.
Bug: 36531717
Test: runtest -x packages/SettingsLib/tests/integ/src/com/android/settingslib/users/AppRestrictionsHelperTest.java
Change-Id: Ia3ff2f470a95f6ee36a97eba8699425274500f17
The tests and the robolectric libraries are already in
SettingsLibRoboTests, and shouldn't be in the package being tested.
Including robolectric in the package causes it to go through
proguard, which complains about missing dependencies.
Also remove the unnecessary libraries that are already included
through frameworks/base/packages/SettingsLib/common.mk.
Test: m -j ANDROID_COMPILE_WITH_JACK=false RunSettingsLibRoboTests
Change-Id: I11f007c4321bb9b147f62010eae046f75d1a52e3
TouchLatency is needed by test TouchLatencyJankTestWear
UiBench is needed by test UiBenchJankTests
Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#
Bug: 35882476
Test: local test
make -j32 TouchLatency TouchLatencyJankTestWear && \
tradefed.sh run template/local --template:map test=TouchLatencyJankTestWear \
--test-tag testname --log-level-display VERBOSE
make -j32 UiBenchJankTests UiBench && \
tradefed.sh run template/local --template:map test=UiBenchJankTests \
--test-tag testname --log-level-display VERBOSE
Change-Id: I63f23e3a21ad1343607953958fb7bb0a5fb8c343
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