1. In AccessPoint#updateBestRssiInfo, if bestResult is available, cache if it’s transition mode at new variables.
2. Remove SECURITY_PSK_SAE_TRANSITION & SECURITY_OWE_TRANSITION since we will cache if an Wi-Fi AP is transition mode.
3. Enhance getSecurity(ScanResult result).
For a PSK/SAE transition mode ScanResult, return SAE.
For a open/OWE transition mode ScanResult, return OWE.
4. Enhance all AccessPoint#matches methods
5. Use enhanced AccessPoint#matches to replace AccessPoint#isKeyEqual
6. In WifiTracker#updateAccessPoints, it associates an AccessPoint with a configured WifiConfiguration
I. If an AccessPoint is PSK/SAE transition mode, update it with a configured network
of the same SSID and PSK/SAE security if it’s available. (SAE has higher priority).
II. If an AccessPoint is Open/OWE transition mode, update it with a configured network
of the same SSID and open/OWE security if it’s available. (OWE has higher priority).
Bug: 144320676
Bug: 144320649
Bug: 144325162
Bug: 144321574
Test: atest SettingsLibTests
manual: In Wi-Fi picker
1. Save a PSK network, click a PSK/SAE transition mode AP of the same SSID,
it should connects.
2. Save a SAE network, click a PSK/SAE transition mode AP of the same SSID,
it should connects.
3. For 1. and 2., the transition mode AP should show 'Saved'.
4. For 1. and 2., looking at saved network page, each saved network should
shows correct connection status of the transition mode AP.
Change-Id: Ida858af791bc60f0ccb11025901de2a79eacba3c
Merged-In: I9688f51f4a4b8e3d5c080fb0d0103abb4e3fd79b
The code allows to also whitelist only a select set of permissions, but
this is not yet exposed in the API.
Also: Fix up shell commands for restricted permissions
Fixes: 132368462
Test: - Enabled app via device admin in secondary profile
-> verified that permissions were whitelisted
- Installed existing and new app using --restrictpermissions and
not
-> verified that permissions were whitelisted or not
atest AppRestrictionsHelperTest
RestrictedPermissionsTest
Change-Id: I9cd76c555b40663f2e25ad86e8a54991baae346c
Merged-In: I9787e63d8beb8f6b1ba2d15532d4c0f69dbdf863
Made sure to update the WifiConfiguration of a Passpoint AccessPoint
to update the friendly name if a user installs an R2 config over an
R1 config.
Bug: 131840803
Test: atest WifiTrackerTest
Change-Id: I39cd5679b65240dabee0f67df866e34d1700c769
Wi-Fi detail page need to use "Disconnected" instead of "Saved" to
improve UX.
Bug: 131119614
Test: atest AccessPointTest
Test: manual test
Change-Id: I8e1cec3c64a3118f6a7448b7ec233cd4d9a92942
Currently ScanResults are evicted from WifiTracker's cache when they
are more than 15 seconds old. Since scans are conducted every 10
seconds, one aborted scan will cause no fresh scans to be seen until
20 seconds later, resulting in all scans to be evicted and the
wifi-picker completely emptying.
This change doubles the eviction timeout to 30 seconds if the last
scan was aborted, avoiding this case.
Bug: 113132408
Test: atest WifiTrackerTest
Change-Id: I2e3aad3a1470f52c3d87e657262a2c4de1bd2418
Added logic in the OSU provisioning callback to connect to a
network immediately after provisioning is complete.
Bug: 123697580
Test: atest AccessPointTest
Change-Id: I39d1ec9726d6211ebd385931e19322bde58baafa
The AccessPoint constructor for PasspointConfigurations was not
setting the AccessPoint key. This caused the Saved Networks Page to
not be able to correctly reference the entries for saved Passpoint
networks, causing entries to not disappear after clicking "forget",
or creating duplicate entries whenever the activity was resumed.
Fixing the key updating/getting for PasspointConfigurations solves
this issue.
Bug: 118705403
Test: atest AccessPointTest
Change-Id: I0e49192ef5efa72fd490e4a0ac987e1c0682e3f3
AccessPointPreference now uses getTitle() as the single method
for the UI title. The saved network case is now also handled by
getTitle().
Marked getConfigName as deprecated in order to encourage use
of getTitle() as the definitive UI title for AccessPoints.
Test: atest AccessPointTest && atest WifiTrackerTest && atest
WifiSettingsTest.
Bug: 118705403
Change-Id: Ieaaef804e46f2eed2543e658aee030021b7d08df
Created separate constructors for Passpoint and OSU, and a separate
scan result update function for Passpoint. Added roaming scans to
full scan result list. Added tests for different AP type behaviors.
Bug: 122849296
Test: atest AccessPointTest
Change-Id: Ie69e08bfb8b997c7b46a9d114969f12c6f03c16c
Determining the active access point at the top of the picker
depended on matching the connection info with a saved configuration.
With Passpoint configs being removed from getConfiguredNetworks, the
matching of Passpoint access points must be done solely through the
current WifiInfo.
Bug: 118705403
Test: atest AccessPointTest
Change-Id: Ia9f5a0d7d7dca26d02a1e747edbf08ecbbec91dd
Use the wifiInfo field to attribute the app that provided the network
suggestion or specified that provided the connection.
Bug: 115504887
Bug: 113878056
Test: atest AccessPointTest WifiTrackerTest
Test: Manual UI verification
Change-Id: Ibea13207622245efc198dc51957cac9f6e2dc526
It enables LocalBluetoothManager to receive broadcasts for a specific
UserHandle, not just the one that created it, by exposing an additional create
method.
To pass in UserHandle different from the one returned in context.getUser(),
one must have INTERACT_ACROSS_USERS_FULL permission.
Should be used by singletons with adequate permissions to be able to monitor
bluetooth state across all users.
For monitoring the state across all users, pass in UserHandle.ALL.
Change-Id: Id89d73b05bfebc2f9e8673c5610b3ff8f70dba0c
Fixes: 117517726
Test: working on them
When fragment is created, it will force display all the APs
from mWifiManager.getScanResults, where it may have obsolete APs.
This CL will evict old scanResults even in this force display, so
it won't show obsolete APs anymore.
Also change the buffer size from 25s to 15s so it only display APs
scanned in last 15s.
Bug: 111738605
Test: SettingsUnitTests
Change-Id: I9413bcba81dba55c6b13cfdca2785069d4d7d105
BatteryMeterView used to draw both the charging bolt and the powersave
'+' symbol as the same color. However the plus sign is drawn as
colorError now, so the test isn't needed anymore.
Test: runtest -x packages/SettingsLib/tests/integ/src/com/android/settingslib/graph/BatteryMeterDrawableBaseTest.java
Change-Id: I014fbc65d96bed727e880ac492913c2e5d50f405
Fixes: 112205156
Moved loading icon logic from TileUtils into Tile#getIcon().
TileUtils only load things once and cache forever but getIcon()
loads a fresh icon every time to avoid any caching issue.
Bug: 77600770
Test: robotests
Change-Id: I706225e382ebd5b72e91edef43bfc7427fa64590
Telephone type span caused talkback stop to read next texture in Setupwizard wifi page. Remove it and doesn't impact previous issue ag/1468171.
New Google TTS can recognize work and doesn't only spell words.
Test: atest
Bug: b/110104543
Change-Id: I4f37a6280294446e5f33ea3620366803b6d30a4e
- new icon size for edit pencil
- removed home.xml, it's not needed by anything except test
Bug: 77982107
Test: visual
Change-Id: I451bc12c4a57e5f61e7c561c394b00bd95e7228d
This CL simplifies SettingsLib by making
isValidSystemNonAuxAsciiCapableIme() method stateless.
Although this can be a minor user-visible behavior change, we believe
it is acceptable because the behavior we are going to drop is a
fallback rule in case there is no system IME that could be considered
ASCII capable without actual AsciiCapable attribute.. Even without
this fallback rule the System Settings does not fall into a bad state.
It only affects the sort order of the IME enabler page and minor
optional cosmetic behavior.
The bottom line is that if a pre-installed IME is ASCII capable, it
really should annotate itself to be so, rather than relying on some
heuristic logic that we have had.
With this CL, SettingsLib no longer depends on InputMethodUtils.
Fix: 77730201
Test: atest InputMethodPreferenceTest
Test: make RunSettingsLibRoboTests -j
Change-Id: I1352bf42dcb9219a370a16a381ea39c43c57637a
CarUserSwitchingDialog threw null-ref because Guest didn't have
a default avatar.
1. Adds null guard in case default avatar is not set.
2. Populates default Guest avatar correctly.
Fixes:77546931
Fixes:78588087
Test: Manual, observing the default icon when starting a guest session.
Manual, observing the switching dialog icon without a default icon.
Change-Id: Iacbfcc65147fdbc5515c0d96eb613fb17543f6b3
As part of effort to lock down the use of InputMethodUtils only within
the core system components, this CL removes the dependency on
InputMethodUtils#getLanguageFromLocaleString() from the Settings UI
code.
At high level, there should be no user visible behavior change.
Bug: 77730201
Test: atest SettingsLibTests:com.android.settingslib.inputmethod.InputMethodSubtypePreferenceTest
Change-Id: I92cc0b0808f3e40ab92b60ec783ad218141f2bbd
current ColorFilter was not an instance of PorterDuffColorFilter
Fixed issue where UserIcondrawable#shouldUpdateColorFilter would
mistakenly return false if the current ColorFilter was not a
PorterDuffColor filter leading to color tints to not be applied if no
ColorFilter was applied previously.
Change-Id: I463932403723b2542cb79e4d996b5ffdc4c32f98
Fixes: 77907724
Test: Re-ran atest on UserIcondrawable
User switcher wrongly called methods on the current process user,
which is always User 0 for SysUI.
Instead, user switcher requires knowledge about foreground user.
The process of user switching = changing the foreground
user.
Split tests between unit and robolectric.
Robolectric tests enable shadowing ActivityManager and UserHandle.
Fixes:77485524
Test: Unit and robolectric tests.
Change-Id: I20cc32f132ce48b4507a6907bdc9d103c04f4a30
Same broadcasts supported by UserSwitcherController.
Car User switcher listens to user changes.
Switcher needs to hear when the user is switched to dismiss the
keyguard,which causes the switching animation to terminate.
Bug:77653809
Test: Unit tests.
Change-Id: I633cbd9045e7254dcc173ca0e1118fca06c669df
Fixing a failing test. Currently unable to test removing current user, since current user is system user.
Fixes: 73415209
Test: unit tests
Change-Id: Ie374aa97383e3dd8ec4ef96b0d680fa8a04172b5
It's a simple wrapper for adding/removing/switching users.
It provides an interface to register listeners for user changes.
Moving it here to be used in CarSettings and SystemUI for the car.
It's not car-specific, so it could be used by anyone who needs it.
Fixes: 74456332
Bug: 74456744
Test: Unit tests in UserManagerHelperTest.java.
Change-Id: I94b3051ed1e4f96d98e5ab2a7a5a7fa75bc5cade
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.
Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.
Test: make relevant packages
Bug: 73535841
Exempt-From-Owner-Approval: Global cleanup
Change-Id: I26458e41ecb84de91ac9a356a5d4bafb44f463c1
Truth.assertThat is a fluent-style API. Fix the tests to actually
do something.
Found by errorprone.
Bug: 73513670
Test: atest WifiTrackerTest
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: Ic16cded73ad5192d6c32033e41e72e39277729c6
Bug: 68030053
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
1. Visual verification of UI when opening WifiSettings directly from
screen off longer than 5 minutes (no scan results scenario).
Change-Id: I7e4d9a3abb861b485b0a952a1a4b822f2460bdc2
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