The ACTION_WIFI_ADD_NETWORKS allows an app to request the user to
confirm addition of WiFi networks. The intent attaches
WifiNetworkSuggestions (used to specify the networks). However, the
calling app may configure MAC randomization to be disabled - using
reflection.
Fix to always override the MAC randomization setting to enabled. This
will override any user configuration to disable randomization - however,
considering this is (now) a new configuration it should safely start
from the default Setting.
Verified using using a test app to force non-randomized (using
reflection) value and confirm that without change randomization is
disabled and that with change it is reset correctly.
Bug: 236825742
Test: manual - use a test app
Change-Id: I3fba958c461d88005fdb5d2c3d1f2fd4ce725b8c
- Use WIFI_LEVEL_MIN instead of WIFI_LEVEL_UNREACHABLE to get the Wi-Fi icon resource to avoid app crashing because no valid Wi-Fi icon could be found.
Bug: 213294802
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=AddAppNetworksFragmentTest
Change-Id: Ia805e902716c25db3276b96116a84d0dd2d96a1b
- Keep user-entered SSIDs in Wi-Fi Configuration
- Ignore CRLF strings in display SSIDs only
Bug: 224545390
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=AddAppNetworksFragmentTest
Change-Id: Ifc081f9c5c02b2d70412f296688b88e44e893add
- Don't show AddAppNetworksActivity if the user is a guest.
Bug: 224772678
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=AddAppNetworksActivityTest
Change-Id: I17571905f1c4a38db884e6d0523b7f8d668df607
- The Wi-Fi Enterprise Restrictions add a new
UserManager.DISALLOW_ADD_WIFI_CONFIG restriction from T.
- When a user requests to add Wi-Fi configuration, Settings will
reject the request if the user is not allowed.
- The above restriction need to be retrieved in advance so that the
user's request will not be rejected.
- See the result screenshot in b/224459753#comment8
Bug: 224459753
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=AddAppNetworksActivity
Change-Id: I2dfb6b9946dd9dbd4eb8bf0f6549ac5cb4466f17
The level of a WifiEntry may be -1 (WIFI_LEVEL_UNREACHABLE) due to race
conditions. Thus, only update the signal icon if the level is a valid
value [0, 4]
Bug: 213477566
Test: m
Change-Id: I87f1c108d262bb5a7575c9ad434d2cfb953134af
When UserManager.DISALLOW_ADD_WIFI_CONFIG is set to true.
- Disable the "Add network" item in the Internet settings.
- Activity action API for ACTION_WIFI_ADD_NETWORKS should not be
permitted and the user shouldn’t see a prompt for approval
Bug: 203169077
Test: make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AddAppNetworksActivityTest
Change-Id: I18d7703b5972bfbc12dca10b6432d756813abace
Allows settings applications on other platforms to re-use values by
migrating to Settings.secure and moving HideNonSystemOverlayMixin to
SettingsLib.
Bug: 184967544
Test: atest SettingsUnitTests
Change-Id: If9aaeca29ebb8b481d75622934503e368d7435d3
This make the WifiTrackerLib can be customized.
Bug: 149540986
Test: manual test wifi picker, and atest com.android.settings
Change-Id: I1418ae39c895ce2ff87f18005a226a4835f9e083
After clicking Save button, the signal icon always shows level 0.
To correctly get the signal, this change fetches both
saved WifiEntries and connected/connecting WifiEntry for signal
icon information.
Bug: 157344581
Test: manual visual
1. Use the intent Settings.ACTION_WIFI_ADD_NETWORKS to bring up the UI.
2. Click Save button and observe the signal icon.
Change-Id: If33d1c02019ea2c1acccfbbc29bd1bf42de1cc82
Add new unit test cases in AddAppNetworksFragmentTest.java
The coverage rate of com.android.settings.wifi.addappnetworks will raise from 65% to 81%
Bug: 151696220
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AddAppNetworksFragmentTest
Change-Id: Iae15b5ad27b20f90cbf8b0318a24a9069b738a33
Should quit worker thread when a fragment is about to
be destroyed.
Bug: 152454787
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AddAppNetworksFragmentTest
Change-Id: I809511b7f7c092cf9787e8f6bb7c7513c27c98c8
Because WifiTracker2 refactoring in framework side is done, Settings App need to refactor AddAppNetworksFragment to use WifiEntry but not AccessPoint.
Bug: 152454787
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AddAppNetworksFragmentTest
Change-Id: Ica2fb7e7fcac112140e5d64f3e4193222c974352
Renamed to getPasspointConfig to be consistent
with setPasspointConfig
Bug: 149912516
Test: compiles
Change-Id: I5809f50793f89eb3b811c019b7494a437dd991e7
issue: Signal icon on the add wifi network feature need to wait for the scan result.
Solution: Apply the cache in the WifiTracker to update signal icon for
shortening the waiting time of new scan result.
Bug: 146842198
Test: Add following unit test cases to test signal level has been updated correctly:
1. withOneSuggestion_whenScanResultChangedButWifiOff_uiListShouldHaveZeroLevel.
Change-Id: Id72e2b43e020f2cafa2af4af5ffb1c28529002bd
Field wifiConfiguration is @hide and cannot be
used, instead use public getter.
Bug: 138801922
Test: compiles
Exempt-From-Owner-Approval: Fix broken build
Change-Id: Idcaa2fee1950651b1a60e52838083ac8d75e9462
Signal icon on the add wifi network feature is constant, didn't change with real signal level.
Bug: 146842198
Test: Add following unit test cases:
1. withOneSuggestion_uiElementShouldHaveInitLevel() to test init level.
2. withOneSuggestion_whenScanResultChanged_uiListShouldHaveNewLevel() to test level should updated according to scan result.
Change-Id: I212a825da9455a09a5c7777f87c0a74ec030c890
Settings uses @hide WifiNetworkSuggestion.
wifiConfiguration/passpointConfiguration.
Migrate to @SystemApi getters.
Removed call to PasspointConfiguration.validate()
as it is an @hide API, instead
WifiManager.addOrUpdatePasspointConfiguration()
will perform the required validation.
Bug: 138801922
Test: make RunSettingsRoboTests -j40
Change-Id: I748010b66634b1d24e89a175917492f638267cb1
WifiConfiguration used in the feature of add apps Wi-Fi networks was Deprecated, need to be changed to use WifiNetworkSuggestion.
Bug: 136472483
Test: Refactor AddAppNetworksFragmentTest to apply WifiNetowrkSuggestion
Change-Id: I022d200905880f7f7bd367f5fa62fa88e785db02
Remove constant security type definition and use
Wificonfiguration.Authtype() to judage same Config or not
Bug: 147258501
Test: Just change constant, so only manually check.
Change-Id: Ib6397f9b6deeec3595b51b8243e35993867460e5
For the R feature "Add saved networks to the
device for apps", need to handle the new intent case to update the content to be the specific networks in the new intent.
Bug: 146105504
Test: Add following unit test case to check if UI list had been updated:
getThreeNetworksNewIntent_shouldHaveThreeItemsInUiList.
Change-Id: Id043fabb16ba5a75aa81be8cacd403e62e5268b8
Use new metric, PANEL_ADD_WIFI_NETWORKS, for proto upload log use.
For R feature: Add a mechanism for apps to add saved networks to the
device, need to apply new metrics category.
Bug: 144891278
Test: Add following test case for testing metric:
getMetricsCategory_shouldReturnPanelAddWifiNetworks()
Change-Id: I7cde8057c5f2b01c951b1de4203ab1c1a2f0f40a
Handle adding multiple networks case, add UI components and process saving flow.
Bug: 136472483
Test: Add unit test cases to test filterSavedNetworks API.
Change-Id: I222e2f8294793796e293de49acdb96ecd6a57b0d
Handle adding one network case, add UI components and process saving/connecting flow.
Bug: 136472483
Test: Add unit test cases to test one network in list case and null list case, and also check if the SSID set correct or not.
Change-Id: I99f804a967575538c9dc3f1faabb2b507e92e558
Add following changes:
1. Add intent receiver.
2. Add panel UI with icon, title, summary.
3. Add two buttons (save and cancel).
4. Add test case for activity and fragment
Bug: 136472483
Test: Add following test cases for checking button and package name in activity and fragment.
1. AddAppNetworksActivityTest
2. AddAppNetworksFragmentTest
Change-Id: I5515a96fa3feb0e3e6d68159b2c0dec0894c15ee