* Add hasHumanReadableName() method to CachedBluetoothDevice that
returns True when BluetoothDevice.getAliasName() is not null nor empty
Bug: 34685932
Test: pair Bluetooth device, send file over Bluetooth, unit tests
Change-Id: I197f3f7f3bcb7d785729473b25638006449ae862
This prevents cached scores from being held indefinitely and used for
SSID fallback logic in WifiTracker (Picker).
Bug: 63073866
Test: runtest --path frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: Ib351d20db30dfd18b69bb1f8e4d4f26fc6b74ef0
This prevents cached scores from being held indefinitely and used for
SSID fallback logic in WifiTracker (Picker).
Bug: 63073866
Test: runtest --path frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: Ib351d20db30dfd18b69bb1f8e4d4f26fc6b74ef0
Merged-In: Ib351d20db30dfd18b69bb1f8e4d4f26fc6b74ef0
Dependency injects the getIcon() functionality in AccessPointPreference
to enable mocking the method in robolectric where it normally fails to
find the resource. Adds a test to verify that getIcon is called on
refresh. Also modifies the constructors to reduce redundancy.
Bug: 35854035, 64898200
Test: make -j40 RunSettingsLibRoboTests
Change-Id: Iaf9e27651db1d9f16f58ac80ac413e9f84f08b39
Injects the IntentFilter into the WifiTracker constructor, allowing
us to pass an empty IntentFilter into tests so that sticky system
broadcasts can be ignored.
Bug: 64495679
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: Ic095e222284179c48bbc5f198a949f14ccbd8489
Cache all seen matching ScoredNetworks, and use these networks to
generate a fallback curve. This cache is kept in sync with WifiTracker's
WifiNetworkScoreCache, hence it does not permanently create any new
objects other than the map itself.
Bug: 63073866
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: I0cdf17f63f0238e0e3a8324190f75d82beaa6672
Merged-In: I0cdf17f63f0238e0e3a8324190f75d82beaa6672
Cache all seen matching ScoredNetworks, and use these networks to
generate a fallback curve. This cache is kept in sync with WifiTracker's
WifiNetworkScoreCache, hence it does not permanently create any new
objects other than the map itself.
Bug: 63073866
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: I0cdf17f63f0238e0e3a8324190f75d82beaa6672
In ag/2580164, in order to minimize changes, we used mutable static
state in WifiTracker to control cache eviction. This breaks a certain
flow in SetupWizard. This change reverts sStaleScanResults to an
instance member and then pipes the value into the AccessPoint update
call to control cache eviction instead of relying on error prone use of
mutable static state.
Bug: 63479352
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
Manual: See bug
Change-Id: Ia6d79c1904294da69841cbdf6eafbf42fa70f2d0
We now still parse dismiss_rule from activity metadata, but intead of
treating it as "first show on Day x, then on day y if user dismiss
suggestion", we simply start showing suggestion on day x. If user
dismisses the suggestion, it's gone forever.
Change-Id: Ia4d14167a407983df22e582f8dbab0c2cc153e1e
Fix: 64297191
Test: robotests
- Add ThreadUtils.postOnBackground helper method
- Don't fallback to app.icon if tile's metadata contains icon uri
- Deprecate TITLE_RES_ID in favor of TITLE metadata
Bug: 63758074
Test: robotests
Change-Id: Ie60fb4677cdb12c3ff313ffdfdb4a4f4960fac0f
Added carrier network info AccessPoint to indicate if a given
AP is associated with a cellular carrier.
Bug: 30988281
Test: manual
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.
java
Change-Id: I10e44b5e18099c7052a973ea24809e75bb2ba9ea
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
Moves the individual ScanResult summary string generation out of
getVisibilityStatus into its own method `verboseScanResultSummary`,
to reduce duplication and to enable testing the per-ScanResult speed labeling.
Bug: 63866500
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: I9583d142a7d50314017154703df4e1ce69fc68aa
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.
Change-Id: Id3ea88b6d321434e20ac0cd3e2670524c237e24e
Bug: 63908636
Test: robotests
(cherry picked from commit 4d37a1a1e1ca902b8a65bce64fafa0eeea51a4dd)
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
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.
Change-Id: Id3ea88b6d321434e20ac0cd3e2670524c237e24e
Bug: 63908636
Test: robotests