WifiEntry#getWifiConfiguration() may return null when
WifiEntry#isSaved() is true. Use WifiEntry#canEasyConnect()
which checks if WifiEntry#getWifiConfiguration() returns
a non-null value.
Bug: 153029289
Test: manual
Connect to a WPA2 Wi-Fi network, click 'Add device'
in Wi-Fi detail page and see if it crashes.
Change-Id: Ia15503eea795fdd54826699828f02c9ff95dcefa
WifiEntry should only supply one security type through getSecurity(),
and transitional types should be converted to the security type that
will be used for connection.
Test: build
Bug: 70983952
Change-Id: I977f6b955b7794124e9b90ad4655cd2a2a30cb6e
Bug: 142752869
Test: Manual, on/off/setting change for hotspot function
Test: make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
Change-Id: I22c89f15a6ef1c5366394431cc5aa7031a573d45
There are still many methods not implemented in WifiEntry. This change has below workarounds:
1. Add WifiEntryShell to provide dummy WifiEntry methods.
2. Add @Ignore to WifiDetailPreferenceController2Test.
Must remove these workarounds after we have more constructed WifiEntry methods.
Bug: 143326832
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.details2
make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.savedaccesspoints2
make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: Ic2edb424b9c645838558fe131991ccb9105dc64c
WifiTracker#getAccessPoints() only contains a hidden SSID Wi-Fi
network if it's a saved Wi-Fi network. We can't check if a hidden
SSID Wi-Fi network is reachable inadvance. That is the difference
after a user scanned a QR code of hidden SSID Wi-Fi network.
Bug: 135892509
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiDppUtilsTest
manual test:
Click the Share button of a connected hidden SSID Wi-Fi network
and save the QR code image. Use Wi-Fi QR code scanner in Wi-Fi
Settings to scan the saved QR code image.
Change-Id: I9056622e6dadb04e5642ae1c50fb4d227a78d26d
This change shows buttons of QR code scnanner and QR code generator
for a connected Wi-Fi network.
Bug: 134706055
Test: Generate QR code for a WPA2/WPA3 personal transition mode Wi-Fi AP
and check if the security type is WPA2 personal.
Generate QR code for open network.
Generate QR code for OWE network.
Scan a QR code of open network, verify connection.
Scan a QR code of OWE network, verify connection.
Scan a QR code of WPA3 network, verify connection.
Scan a QR code of WPA3 network, verify transition mode connection.
Change-Id: I60f2c38585f85745f992fa63a5ea85312f08c5e5
Passpoint provisioning is much different from other Wi-Fi networks and ZXing
does not support a QR code format to share a passpoint Wi-Fi network. We
should not show any button to share a passpoint Wi-Fi network.
Bug: 130609037
Test: manual
Change-Id: Ie2538ed9e030e5aa2e88452b50b6592223ca46a8
For a WEP Wi-Fi network, we should get the password from
WifiConfiguration#wepKeys instead of WifiConfiguration#preSharedKey.
Bug: 130204717
Test: manual
Change-Id: I766a767f3d605c7fbf0b71d263fd111f159c7cde
When scanned a no password ZXing QR code, add both open network &
enhanced open network to configured Wi-Fi network list because this kind
of QR code may refer to a open network or an enhanced open network.
Bug: 124131581
Test: manual
Change-Id: Id9f85ef8dcdf72347be8106938437aecd0eed9f5
Wi-Fi QR code scan button only shows for the Wi-Fi network which
supports Wi-Fi Easy Connect or ZXing Wi-Fi config format.
Bug: 128847959
Test: manual
Change-Id: If6460ce88748e7b06893bf62060418a8727d3134
To separate it further from Wi-Fi sharing as it was
causing some confusion.
Bug: 129031195
Test: manual test
Change-Id: Ia55e3ed91e92c3ec36ae6a9401897c5c960762da
1. Change lock screen title and remove description
2. In QR code generator screen, change summary and show password under QR code picture
Bug: 128920152
Bug: 128576809
Test: manual test
Change-Id: Id096d7f417308df14ffe50c618644750aa991df8
1. QR code scanner (Wi-Fi Easy Connect) does not support sharing Wi-Fi hotspot
at current stage
2. Wi-Fi hotspot QR code button only shows when Wi-Fi hotspot is enabled
3. The QR code has the security string "WPA" for hotspot's WPA2_PSK
Bug: 123151660
Test: atest WifiTetherSSIDPreferenceControllerTest
WifiQrCodeTest WifiDppConfiguratorActivityTest
WifiDppEnrolleeActivityTest
WifiDppQrCodeGeneratorFragmentTest
WifiDppQrCodeScannerFragmentTest
WifiNetworkListFragmentTest
WifiDppChooseSavedWifiNetworkFragmentTest
Change-Id: I2e89450180b82cc841ee3b15be52bfc6f9f6164d
1. From ACTION_PROCESS_WIFI_EASY_CONNECT_QR_CODE to ACTION_PROCESS_WIFI_EASY_CONNECT_URI
2. Remove EXTRA_QR_CODE and use data Uri to specify Easy Connect bootstrapping information string
Bug: 125874365
Test: atest AvailableIntentsTest
WifiDppChooseSavedWifiNetworkFragmentTest
WifiDppConfiguratorActivityTest
WifiNetworkListFragmentTest
Change-Id: I706513520daa10197a27f596fa08ca58980205d8
1. Do not start WifiSettings after enrollee success
2. Return WifiConfiguration to the calling object after enrollee success
3. In WifiDialog, do not show scan button if Save button is not visible to users
4. Fix scanner button may not respond problem by setting listener for scanner
button of ssid field and password field
5. If SSID is assigned, only allow to enrollee for the network of assigned SSID
Bug: 124416152
Test: manual test
Change-Id: Ic5241c4767eaa8ea01782817d8302d8b0572ab36
Show error message for corresponding Wi-Fi DPP error code. And
1. To update error message only from each fragment,
remove some callbacks which calls from fragment to activity.
2. After clicking 'Share Wi-Fi' button, hide it before Wi-Fi DPP handshake completes.
3. Show 'Done' button for some error codes.
4. Use ViewModel to call startEasyConnectAsConfiguratorInitiator and
startEasyConnectAsEnrolleeInitiator because a lifecycle object
does not receive an Executor callback after configurator change.
5. In WifiDppQrCodeScannerFragment, show an error message for 10s instead of 2s
since new added error messages may carry more information.
6. Show a different error message for enrollee handshake success but Wi-Fi
connection fail case.
7. stop camera when scanned a Wi-Fi DPP QR code for enrollee.
8. In QR code scanner fragment, support to show error message after
configuration change.
Bug: 124247872
Bug: 124491247
Test: manual test
atest WifiQrCodeTest
atest WifiDppConfiguratorActivityTest
atest WifiDppEnrolleeActivityTest
atest WifiDppQrCodeGeneratorFragmentTest
atest WifiDppQrCodeScannerFragmentTest
atest WifiNetworkListFragmentTest
atest WifiDppChooseSavedWifiNetworkFragmentTest
Change-Id: Id130215e9ddafac8bc4c68238deda48ce99b4255
1. When a Wi-Fi network connected and receiving
intent android.settings.PROCESS_WIFI_EASY_CONNECT_QR_CODE,
show WifiDppAddDeviceFragment from WifiDppConfiguratorActivity
instead of WifiNetworkListFragment
2. Only handle intent when savedInstanceState is null
3. To show a fragment
I. do nothing when a fragment is already visible on screen,
II. pop back stack if it's in back stack, we can do this because
current fragment transactions are arranged in an order
Bug: 124194531
Test: atest WifiQrCodeTest
atest WifiDppConfiguratorActivityTest
atest WifiDppEnrolleeActivityTest
atest WifiDppQrCodeGeneratorFragmentTest
atest WifiDppQrCodeScannerFragmentTest
atest WifiNetworkListFragmentTest
atest WifiDppChooseSavedWifiNetworkFragmentTest
Change-Id: I1d44eeb3bdc7bfb2ec2e4d81efaab64b066651ad
There is different Wi-Fi security support between ZXing's Wi-Fi QR code
format and Wi-Fi DPP QR code format.
ZXing's Wi-Fi QR code format: supports WEP / WPA / none security
Wi-Fi DPP: supports WPA / SAE
So we will have different UI behavior for different security.
WEP & none security: only support QR code generator
WPA: supports both QR code generator & scanner
SAE: only supports QR code scanner
others: don't support. The share button is invisible
Bug: 123212410
Test: manual test
Change-Id: I87962d730282fc2c1b96223dca6feb79235fe5a1
1. As DPP configurator initiator.
2. As DPP enrollee initiator.
3. Pass whole DPP url to DPP API due to API cahnged.
Bug: 122331217
Test: manual test
Change-Id: I8005b78b82453badf253dbde8022ff20722b39fd
1.Add a button to launch QR code scanner when add a network.
2.Scan button added in AddNetworkFragment / WifiDialog / WifiSettings.
Bug: 120630683
Test: make RunSettingsRoboTests
Change-Id: I340bfa2247e092f586dd90dfea37c355e681ffee