In ag/2580164 AccessPoint.java made a reference to WifiTracker, which
in term references WifiNetworkScoreCache. Since the Robolectric in the
platform still has not been updated to support API 26 (Android O), this
caused the test to break.
By definining the class in the test package, the test can be fixed until
proper Android O support is added to the robolectric prebuilts in the
platform code.
Bug: 64217019
Test: make -j40 RunSettingsLibRoboTests
Change-Id: I6cfd5c17d1aba98d43cca4828058493960a7ff79
The potential for a race condition exists in WifiTrackerTest,
which intermittently manifests in APCT. By waiting for all handlers
to be idle before asserting our test verification, we can fix this
flaky test. Also added more verification steps to test code to more
precisely indicate where a test may be failing.
Bug: b/64047370
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I597fd7dc29e7f3b0d13c8cdebfa208326a64f507
When starting WifiTracker, show whatever results are available from
platform until new scan results come in. This allows us to show the best
available results from the previous location scan. Once we have resumed
scanning and new scan results come in, the previous logic of evicting
scan results older than 15 seconds applies.
Also prevent unnecessary onConnectedChanged callbacks from being fired,
which may unnecessarily cause UI reloading bars to appear by performing
unnecessary work.
Bug: b/38212080
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java &&
runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I3db9d98425b3d2fc66fa0757807a318d0c7456ee
We store a index value in shared pref to figure out when a suggestion
should be displayed next time. However the rule can change due to
various reasons. When the index and the rule itself go out of sync, we
should not crash.
Merged-In: Id3ea88b6d321434e20ac0cd3e2670524c237e24e
Change-Id: Ied4a0359f9bc22ee94ec79c0591d2671a9c31b86
Fix: 63908636
Test: robotests
This stops the RSSI of an AccessPoint object being updated from WifiInfo
for the current network, when that WifiInfo does not have a valid RSSI.
This occurs when attempting to connect to a network, and the connection
has not yet been established.
Fixes a UI bug where the signal strength would appear to be zero when
attempting to connect to something, or after failing to.
Bug: 63487286
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Test: Manual. Attempt to connect to network with bad PSK. Observe Signal
strength does not get set to zero.
Change-Id: Ia5343fb6f0935134e6a4f82034de164342fe55d4
In ag/2409026 we introduced a stale scan result bit to prevent callbacks
from sticky broadcasts from occuring until we have fetched the latest
set of scan results. However, this initial value was set to false hence
there is a race condition in which the currently connected network can
still be shown without any other networks, as the scan results have not
yet been processed.
By changing the initial value to true, we address this race condition.
Bug: b/62493360
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I5f2108e17d2c549e2176ccf64e640fbd4808b5f1
Forgetting a network from the wifi network details page throws an NPE in
WifiSettings when the details fragment exits, crashing the app.
Bug: b/63351286
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: I749ecbda5654ff7a86ffe4c38ca74ebe338923f0
* Add handler for BluetoothDevice.ACTION_BATTERY_LEVEL_CHANGED intent
* Check battery level information when UI is updated
* Show battery level in Quick Settings connected device summary line
* Show battery level in Bluetooth Settings connected device summary line
* Show battery level in Bluetooth device details page device summary
line
* Add unit test for CachedBluetoothDevice, change HeadsetProfile and
HidProfile to not final to enable mocking
Bug: 35874078
Test: make, unit test, connect to remote devices, connect/disconnect
profiles
Change-Id: I729048cace73aab29337a8002a2897d2acf22fa6
This allows it to be reused in the SavedAccessPointsWifiSettings.
Bug: b/62374459
Test: make -j40 RunSettingsLibRoboTests
Change-Id: Id137f56ceafe461d217c0eee6b571ccfa4eaff1f
This is necessary to make it accessible to other test packages, such as
WifiSettingsUiTest.java in packages/apps/Settings.
Bug: 37558394
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java
Change-Id: Ic1e4185639b2947433d6371e74448097d6adb962
Currently, calling AccessPoint.update(config, info, networkInfo) will
not store the new WifiConfiguration object if it has changed. This can
cause the summary statement to fall out of sync.
Bug: b/38409294
Test: Open WifiNetworkDetails page with verbose logging. Stale state no
longer shown when config changes.
runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: I86411527472621f86ab691ee772c0b3d2153d01f
When Wifi is not Enabled, we should clear existing access points. This
avoids showing stale data when wifi is turned back on. Since this method can
now invoke onAccessPointsChanged callbacks, add extra gating for
mStaleScanResults.
Improve test flakiness by waiting for Work and Main handlers to
finish processing messages before continuing.
Bug: b/37832771
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I34faabec01a7188debe3c3b2fe6a0e02f49b320f
This updates to the newly defined TRON counters and futures proofs us
for new values. Prior to this change, introducing a new enum would throw
an IllegalArgumentException.
Bug: b/35628911
Test: NA
Change-Id: I46662d53b31858396c9a5a6113b1166fba4dfc51
Also test to make sure the colors stay the same.
Test: runtest -x frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/graph/BatteryMeterDrawableBaseTest.java
Bug: 62668861
Change-Id: I7d01fd41aeedcb182dc05da8d7b0501a6b5b8539
updateAccessPointsLocked holds mLock to avoid concurrent modifications.
When WifiSettings onStop is called, it calls the trackers stopTracking
method, it is also synchonized on mLock, hence the main thread is blocked
until updateAccessPoints finished. If the IPCs take too long, this can
cause an ANR. Refactor the IPC calls outside of the synchonized block to
avoid this condition.
Also mark certain tests as flakey.
Bug: b/62343176
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I2b6aff8fafe859dfc1a5192c2d352a65cfa73cbb
This ensures that QS, Settings, and Status bar all use the same drawable
base so they will always look the same. Battery saver is essentially a
full battery that always shows the power saver iconography.
Test: visual; runtest -x
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/graph/BatteryMeterDrawableBaseTest.java
Bug: 62668861
Change-Id: I8a9d5e59c9bb38c0ef794a0ed591195809521f70
If APs differ only in case, further compare by case.
Bug: b/36719423
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: Ic36a2221a668fa59230bb0ddbee2055776d2dc44
Bug: 62444625
Test: Manually connect to a WPA network with a wrong password,
verify "Check password and try again" is shown under the network name
Change-Id: Ic226f4bb9b97969ef7e369de4f7a6976a229ba77
Add meta data com.android.settings.icon_tintable so that icons can
be marked as tintable by settings or setup wizard.
Also deprecate com.android.settings.title_res because
com.android.settings.title can do everything it does.
Test: cd tests/robotests && mma
Bug: 62258845
Change-Id: I063be62867dd8a81ab35ff3fe8a85c61e4c6f17d
Now it becomes possible to use META_DATA_PREFERENCE_SUMMARY_URI in
in conjunction with META_DATA_PREFERENCE_CUSTOM_VIEW.
Bug: 62384773
Test: make RunSettingsLibRoboTests -j40
Change-Id: I91401140b2ed0b12c26b91c8fb3d464179e75844
This bit is set to true during stop tracking and will not change until
fresh scan results come in. This bit is used to prevent
onAccessPointsChanged callbacks from being invoked until other new scan
results are processed.
This is necessary to fix a UI issue in WifiSettings during app
resumption where sticky broadcasts from other intents come in before
a new scan result is available, causing us to clear out all shown APs
since the ScanResults are stale and thus removed from the picker.
Bug: b/38212080
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I2f1fd84d1ab3461d9c8eac9511b90ba7533879c1
This cl is a partial revert of ag/1490275, and only
reverts the method getTimeZoneOffsetAndName. Reverting
it because it fails the PTCRB test.
After this revert, it will consistently show the zone
long name in Date & time page (which is the behaviour
in N).
Bug: 62077986
Test: SettingsLibTests
Change-Id: I8174bd7a3de09e476bbffefa6e71d997340dc7d8
Speed labeling is turned on in O-DR hence this CL should not be merged
into master. Using the merged in tag below which implements speed
labeling (ag/2346102) to prevent this CL from being merged into upstream
branches which need scoring ui.
Merged-In: I0fd96da6a06dafd8c8ebb435a2725ab155bd26ed
Bug: b/35628911
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I5740f68be25d5ec297f1f7dc3b3e59203cec2eb5
Stop using deprecated API enums and instead define internal constants
for different network speeds. Add support for 'SLOW' networks.
Bug: b/35628911
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: I3394f801118adffcb4ba49035e0b22eebb9f0e9a
Bug: 62039146
Fix: 62138362
Test: make RunSettingsLibRoboTests
- Do not use enhanced loop in lifecycle events to avoid Concurrent
modification exception.
- Tweak footer preference icon layout
- Add some logging to help debug future suggestion issues
Change-Id: I08eb3aca4b776a7d7e5db75dff8f92904d482aa3
In preparation for modifying the graph code to show detailed projections
(see bug), this change moves it into Settings along with related tests
and resources.
Bug: 38400320
Test: manual, make SettingsUnitTests, make SettingsGoogleUnitTests
Change-Id: I88e5336c15827727b3427e29b10954bba9cfba7d
The saved configurations included saved Wi-Fi networks and
Passpoint profiles.
Bug: 62048284
Test: manual test
Change-Id: I55be798d5f36fa678bf69d9f910ca10ed952518a