Although the AccessPointControllerImpl class is modified, there is no
longer a wifi picker in QuickSettings.
Bug: 68030053
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Manual testing of WifiSettings cold start / resumption scenarios for UI
jank
Change-Id: Ib28edebb0acf4160cc9eda7c1620c1b4280dcdc4
The executor no longer instantiates it's on main thread handler, and
instead uses ThreadUtils.postOnMainThread.
Also clean up WifiTracker tests, since the custom Handlers have been
removed, and the broadcast receiver method is invoked directly in the
tests, it is no longer necessary to wait for handlers to finish processing
messages.
Although the only asynchronous source code (invocation of WifiListener
methods) is now mockable via WifiListenerExecutor injection,
CountDownLatches used in cases where verifying multiple mock invocations
would be confusing due to test setup behavior.
Bug: 68030053
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I485c62d81ec2cdd3d53ed3e258ae6b40837cdc51
All work is still performed on the given workThread, just without the
need for a custom Handler class.
Bug: 68030053
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: Id4509821e51a1a8e1b171710b33b83212f2a506a
* changes:
Consolidate all work in the WorkHandler.
Remove the double lists in WifiTracker.
Delete the MainHandler and remaining code.
Remove methods from MainHandler.
By putting it in SettingsLib, it should be accessible to every app that
needs it.
This also adds in the ability for the framework to define default
behavior. The default behavior for the storage manager enabled status
may differ based upon the device.
Bug: 70893105
Test: SettingsLib Robotests
Change-Id: I9082a77f90289b8fa208c628dd3606000e19495b
This CL completes the final removal of the double handler, double list,
pending notification complexity that was introduced ag/1396615 as a
'fix' to improper API implementation of the AccessPointListener
callback. The implementation erroneously refetched the entire
WifiTracker list and then performed its own sorting everytime an
individual AccessPoint was updated, instead of waiting for WifiTracker's
WifiListener.onAccessPointsChanged (plural) method instead.
Those changes have now been reverted, and the underlying SetupWizard
code has changed since then such that it does not need to be modified to
prevent regressions.
Bug: 37674366
Test: 1. runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
2. runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
3. Manual testing of WifiSettings for visual jank
4. Startup and manual inspection of SetupWizard Wifi Picker.
Change-Id: Ia4079859a7a892983ecf55ba8eab13d20120ff99
As of ag/3516264 this is no longer required. Next CL will remove the
double lists and pending notification structure.
Bug: 37674366
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
1. Manual testing of WifiSettings for visual jank
2. Start up and confirmation of SetupWizard wifi picker.
Change-Id: I3f2c649375f245295a00177f805d6d3e883fe656
Followup from ag/3516264 where callbacks are now already invoked on the
main thread. There is no reason to execute this methods on the
MainThread. Removing UPDATE_ACCESS_POINTS in following CL as it has more logic
in that requires careful modification.
Also make changes to how verbose logging is determined (now respects
logging tag as well as developer option) and log callbacks.
Bug: 37674366
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I373af3a65596d478ec25bd2c67a41fc3c7033beb
This allows SettingsLib to test against the latest framework changes.
Also replaced TestConfig with traditional robolectric.properties.
Also reworked the test runner to avoid using deprecated API.
Bug: 73173204
Test: make -j56 RunSettingsLibRoboTests
Change-Id: Iebe130d6542ed7096147e3fff61f9cfd76aad948
* The hard-coded "active" / "active(media)" / "active(phone)" strings
are removed and replaced with proper XML-based string formatting.
* Added the appropriate strings for Bluetooth Audio Active Device status:
"bluetooth_audio_active_device_summaries". For now those strings are
marked as translatable="false" until the actual UI is finalized.
* Updated all "bluetooth_connected*" strings to include the new
"active_device" component.
* Added unit tests for the new "active" strings.
Also, updated existing unit tests to check the getConnectionSummary()
strings by comparing against strings embedded within the unit tests.
Bug: 72317067
Test: Unit tests added: make RunSettingsLibRoboTests -j40
Manual: two headsets and switching the active device
Change-Id: Ide639b5dfb45c1db8114155240f193249aeaf3be
Dev option is not supposed to show up when there is a user restriction.
However the restriction is sometimes not applied universally. So let's
move the check into controller and avoid handling this logic ad-hoc.
Change-Id: Iab85c90a7c43330abb66bf63dc4c70fb69bc3757
Fixes: 72815875
Test: robotest
Now that hybrid notifications exist in SysUI these strings should
be moved into settingsLib so we don't duplicate them. Additionally
several utility methods were moved so that they could be shared to
help keep behavior and strings consistent between different system
components that show battery time remaining.
Test: robotests
Bug: 65656091
Bug: 66909350
Bug: 67469159
Change-Id: Ifdaf02cf39354ed0088560490eabf8b101788a83
- Simply finishing activity bypasses the entire nav-up chain, making
taskAffinity/parentActivity defined in androidmanifest.xml no-op, which
is bad.
- Also removed showMenu() logic, this is from drawer era and was only
needed by mobile settings. We no longer need drawer so this method can
be removed.
Bug: 72337421
Test: atest
Change-Id: Idee1b72751363b5162887a799197404a9498c83e
WifiTracker always is used in 'includeScans' mode, and is never used in
includeSaved mode. The former variable was not even referenced. The
original functionality of includeSaved true and includeScans mode was
for rendering the Saved Access Points page, which is now provided by
another utility. All calling apps currently filter out unreachable saved
networks they receive from WifiTracker.
Subsequent CLs will modify the updateAccessPointsLocked loop to simply
insert config data into existing APs, thus reducing the complexity of
thi class.
Bug: 68030053
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I7adb6de2e700c48543d7a43419527052f2909cc0
WifiTracker and AccessPoint both maintain their own caches of
ScanResults and dictate their own grouping logic. This leads to various
issues, such as dropping APs during network selection. Remove the double
cache eviction logic, making WifiTracker the source of truth for
evicting and grouping ScanResults.
Consolidate on AccessPoint time based eviction logic. In place swap of
logic, with subsequent wifi tracker clean up and cache rekeying to
follow in later CLs. Logic was left as close to original location for
reviewer ease and will be rearranged in following CLs.
Moves existing key generation logic from AccessPointPreference into
AccessPoint.java
BUG: 64989100
Test: runtest 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
make RunSettingsLibRoboTests
make RunSettingsRoboTests
Manual inspection of WifiSettings jitter when changing networks / moving
across floors.
Change-Id: Id30a34b08e14fc8da2c9d29dfcb5d1e8973cc18c
* Update usage of A2dpService API calls that take BluetoothDevice
as an additional argument
* Update the description for BluetoothA2dp.connect()
Exempt-From-Owner-Approval: De-facto owner of the relevant changes is
the Bluetooth team.
Bug: 69269748
Test: Manual
Change-Id: I190ed48ef65bbc8b88b45f84ebd6ab3d21cf0b4e
Store location changer into Settings.Secure
Modify quick settings to identify itself as location changer
Bug: 68779883
Test: Manual
Change-Id: I2c7a599e1383102685994d876e7160e164436a08
This reverts commit 2e9781034f796826727a55ad36f8213a8d7452fb.
Reason for revert: NPE now fixed, test added, see b/72267201.
Change-Id: I63cf296675e526776e0bef334d30141ea98904c3
Copy classes to SettingsLib from Settings so the code can be
shared with TvSettings.
Test: mmma SettingsLib/tests/robotests
Change-Id: If2d7db9d998af9d262a5e225c3b7a5cacb053542
1. Mark public fields as deprecated: LOCATION_MODE, LOCATION_MODE_HIGH_ACCURACY, LOCATION_MODE_SENSORS_ONLY,
LOCATION_MODE_BATTERY_SAVING, LOCATION_MODE_OFF.
2. Add new public methods to LocationManager:
setLocationEnabled(boolean)
isLocationEnabled()
setLocationProviderEnabled(String, boolean)
3. Remove LOCATION_PREVIOUS_MODE and constant
LOCATION_MODE_PREVIOUS. Refactor code that references
LOCATION_MODE_PREVIOUS to use LocationManager.setLocationEnabled or
LOCATION_MODE_HIGH_ACCURACY.
4. Mark deprecated fields and methods as removed: LOCATION_PROVIDERS_ALLOWED, setLocationProviderEnabled(), isLocationProviderEnabled()
5. Refactor logic in Settings app and Quick Settings to call
LocationManager.setLocationEnabled() instead of setting location mode.
Bug: 70990911
Test: Manual
Change-Id: Ia49b385f8b6a358b62291983eb0146af0ecf8e02
This cl is the first step to clean up the AccessPoint.
Bug: 70983952
Test: RunSettingsLibRoboTests
Change-Id: I23b5b4bee6f4533ea7e59ede3dc9c66af80bf0b6
The list of apps with recent location requests is currently displayed in
alphabetical order on device (Settings -> Security & Location ->
Location). Sort this list by recency: (1) apps that are currently
requesting location are displayed on the top. (2) For apps that are not currently
requesting location, the ones with most recent location request finish
time come first.
Bug: 70350519
Test: Robolectric
Test: manual
Change-Id: I5c757defcd7645d254c9c47e3c83f7e323247a71
The rssiChangeBroadcastShouldUpdateConnectedAp uses two CountDownLatch instances to
synchronize the events on the main thread and the handler thread. The "latch" informs
the main thread that mockWifiManager.getConnectionInfo() has been called and allows it
to proceed, and "mAccessPointsChangedLatch" notes that onAccessPointsChanged is called.
But mAccessPointsChangedLatch was assigned after "latch" released the main thread,
so that on occasion the main thread could try to use it before this assignment, causing
the timeout.
Move the assignment of mAccessPointsChangedLatch to before the body of the test
to prevent this race.
Bug: 70163367
Test: runtest --path frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I62c1ef9a2155ffbd08b5e07e94723b28102d1f6d