- Use WifiEntry#canConnect() to determine if the network can be
connected.
- Add WiFi network but don't connect if WiFi restricted connection.
- See the result screenshot in b/203168943#comment16
Bug: 203168938
Bug: 203168943
Test: manual test
make RunSettingsRoboTests \
ROBOTEST_FILTER=WifiDppQrCodeScannerFragmentTest
Change-Id: I06d1e832176e540ddd1adce8da46ef8659534ab7
Rotating screen, wifi p2p setting fragement will be re-created and the selected wifi p2p device will be saved in onSaveInstanceState. However, now this saved wifi p2p device is restored in onActivityCreated, this is too late. So when getting this saved wifi p2p device return NULL in onCreateDialog and leads to NPE force close.
Restore the saved wifi p2p device in onCreateView instead of onActivityCreated.
Bug: 220025725
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2pSettingsTest
Change-Id: I9b746e21f7f3651c69b1445f2389c089ec19319c
Rotating screen will trigger wifisettings re-creation. Force close occurs If receiving wifi picker tracker callback during activity finishing.
Bug: 218411211
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiSettingsTest
Change-Id: I06d251a8a12d3f8785db24ead0abe31c0f34cc9b
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: 201488249
Test: m
Change-Id: I87f1c108d262bb5a7575c9ad434d2cfb953134af
(cherry picked from commit 9d66b22ee0)
- Remove "Share" and "Forget" options from the long press menu
- Rollback the Wi-Fi details restriction for admin user only
- Add SafetyNet Logging for security report
Bug: 206986392
Test: manual test
make RunSettingsRoboTests \
ROBOTEST_FILTER=NetworkProviderSettingsTest
make RunSettingsRoboTests \
ROBOTEST_FILTER=WifiNetworkDetailsFragmentTest
Change-Id: Ic434f0583cba557228c72508a501347ffa3141e1
If Wifi verbose logging is on, increase the max lines for
WifiEntryPreference's summary to 100 in order to fit the extra verbose
logging information.
Bug: 222337006
Test: manually build and verify verbose summary fits
Change-Id: I919ae1bcfb26ea8c2548ebdcd3387c90e1d17ea9
- The Wi-Fi hotspot switch only handles the click event from the UI.
- Use the onSwitchChanged callback to handle click and swipe events.
Bug: 218891956
Test: manual test
make RunSettingsRoboTests \
ROBOTEST_FILTER=WifiTetherSwitchBarControllerTest
Change-Id: Ie4136443845489be295a8ee0f3058f493a3b5829
- 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
- When the user requests "try again", the Network-Request-Dialog will be
recreated. If the Wi-Fi framework sends the callback result at this
time, the Network-Request-Dialog may not be ready at the moment,
causing the NPE to crash.
- Add NPE checks to avoid crash issues.
Bug: 220679437
Test: manual test
make RunSettingsRoboTests \
ROBOTEST_FILTER=NetworkRequestDialogActivityTest
Change-Id: I8e48a29649e72d9f8c67c4ac24f0eb27ba600dae
When user switch between settings of hotspot(Enable hotspot),
Internet(Enable Wifi) and Wifi-Direct(establish, disconnect and
forgot P2P connection).
mChannel becomes null during WiFi P2P user scenarios resulting
in Settings(com.android.settings) crash on enable Wifi.
This commit fixes mChannel IllegalArgumentException: Channel
needs to be initialized.
Test: manual test
Bug: 218608961
Change-Id: I72c67bcd1086afe2aa8d2c5521107e2d38e5b0bb
Fix two crashes when scanning a WiFi QR code.
The crashes are due to the asynchronous nature of the scan/decode
process, where the result is delivered after the activity has been
destroyed.
Bug: 223640678
Test: manual, Settings -> Network & internet -> Internet
Press the 'Scan QR code' icon
Start to scan a WiFi QR code
Just before then scan/decode completes, press Back
Change-Id: Ic19ca08590ed76ca9be46eabe3e0b17419fb0b44
Frameworks move psk ascii password length check from API level to
framework internal. Add the check code in Setting side to avoid breaking
the unit test.
Bug: 223513510
Test: atest -c WifiUtilsTest
Change-Id: I7c78eb367fdcbbc11bbb7169ba8f2edc720ad071
- Use StandardWifiEntry#canConnect() to determine if the network should
be disabled or not.
- Use StandardWifiEntry#getSummary() to retrieve the restriction message.
- Disabled WiFi network if it cannot connect.
- If WiFi network is connected or saved network, leave it enabled to
disconnect or configure.
- See the result screenshot in b/203168943#comment11
Bug: 203168938
Bug: 203168943
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=LongPressWifiEntryPreferenceTest
make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest
Merged-In: I04aafaa5b383598a0f87eea15d06b38bbc662b9e
Change-Id: I04aafaa5b383598a0f87eea15d06b38bbc662b9e
(cherry picked from commit f86bdc9c69)
P2P dialog is moved to an indenpendent activity, it will push Settings
to background and trigger onPause(). As P2P dialog is a Dialog Activity,
it won't trigger onStop, but SoftAp and NAN activity will. Moving
channel closing to onStop to adapt to new P2P dialog design.
Bug: 219406778
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2pSettingsTest
create a p2p connection between 2 devices with this build.
Change-Id: I2fab5aa1021ec1a993f811c7310079db9d7f03c0
- Remove the limitation of the Settings UI for Admin user only.
- See b/206986392#comment32 for a screenshot.
Bug: 206986392
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiNetworkDetailsFragmentTest
Change-Id: I31971d644cd475123255ffb6c93c16ff171f77ad
- Updated to use the AllNetworkKeys set instead of NetworkId.
- Fix crash issue when mDataUsageController is not created.
- See b/126299427#comment37 for a screenshot.
Bug: 126299427
Test: manual test
make RunSettingsRoboTests
ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiDetailPreferenceController2Test
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiDataUsageSummaryPreferenceControllerTest
Change-Id: I26289fde1f18d97631448edc71e034d33b865cc4
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
- Use MessageFormat instead of getQuantityString().
Bug: 199229953
Test: manual test
See b/199229953#comment2 for a screenshot result.
Change-Id: I4fc9cecc83f503203ec5dbc1af638036d7026e07
- Since the "Mobile-Data Details Settings" (NETWORK_OPERATOR_SETTINGS) will query Carrier-Config around 70 times during launching, use the Carrier-Config cache to reduce 69 times to speed up the launching time.
- It takes about 3ms to query a Carrier-Config each time.
- Create a singleton class to share the Carrier-Config for all
sub-settings.
Bug: 204135235
Test: manual test
atest -c ApnPreferenceControllerTest \
AutoSelectPreferenceControllerTest \
BackupCallingPreferenceControllerTest \
CarrierConfigCacheTest \
CarrierPreferenceControllerTest \
CarrierSettingsVersionPreferenceControllerTest \
DataServiceSetupPreferenceControllerTest \
Enable2gPreferenceControllerTest \
EnabledNetworkModePreferenceControllerTest \
Enhanced4gBasePreferenceControllerTest \
MobileNetworkUtilsTest \
NetworkProviderBackupCallingGroupTest \
NrAdvancedCallingPreferenceControllerTest \
PreferredNetworkModePreferenceControllerTest \
TelephonyTogglePreferenceControllerTest \
WifiPickerTrackerHelperTest
make RunSettingsRoboTests \
ROBOTEST_FILTER=ContactDiscoveryPreferenceControllerTest
make RunSettingsRoboTests \
ROBOTEST_FILTER=VideoCallingPreferenceControllerTest
Change-Id: I26f9ac115a754910b5d59e820703f1a0e701bb7f
Bug: 196180536
Test: * connect to a EAP-TLS network with TOFU option
* make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test
Change-Id: I30b55d835bd073d604bddd235f2425bdc8b647af
This is a no-op refactoring.
These functions are deprecated and replaced by
NetworkTemplate#Builder, use public API instead.
Test: make RunSettingsLibRoboTests
Bug: 204830222
Change-Id: Idc2a09d8e3789ca2c7a97691cfad4b2e2b417f0d
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
- The ShadowWifiManager class is not working as expected
- Use Mockito class instead of Shadow class
Bug: 175369329
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDialogActivityTest
Change-Id: Idbc851c4d9702be23561c2c48c9d7d077e5f452e