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
Merged-In: I9056622e6dadb04e5642ae1c50fb4d227a78d26d
After a user uses Wi-Fi QR code scanner to scan a QR code of an unreachable
Wi-Fi network, the scanner does not recognize any QR code until the scanner is
restarted or back from a screen off state.
To restart QrCamera after a Wi-Fi QR code recognition, we should stop it before
start, otherwise the DecodeTask will not work.
Bug: 135225856
Test: Scan a Wi-Fi QR code of unreachable Wi-Fi network and
scan a Wi-Fi QR code of reachable Wi-Fi network, check
if the scanner recognizes QR code.
Change-Id: I0063c867d8e4046f184d02134bda842887c003a1
// ACTION: Share a Wi-Fi network by generating a QR code
ACTION_SETTINGS_SHARE_WIFI_QR_CODE
// ACTION: Connect to a Wi-Fi network by scanning a QR code
ACTION_SETTINGS_ENROLL_WIFI_QR_CODE
// ACTION: Share Wi-Fi hotspot by generating a QR code
ACTION_SETTINGS_SHARE_WIFI_HOTSPOT_QR_CODE
Bug: 130521826
Test: manual
Change-Id: I4204307dd5318eb7c47e4136dc7d8700d43e4da1
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
1. When camera area overlaps display cutout, it's onLayout size is 0/0.
To fix it, use ConstraintLayout to specify width and height in layout file.
2. When scanned a QR code and there is an error, set camera area frame line
back to unfocused color.
Bug: 124399763
Test: manual test
Change-Id: I7575efd0ccfb58d114acc3dcca6978d68b801f91
WifiManager#connect may callback onSuccess even if the Wi-Fi network is not reachable,
it confuses users.
In onSuccess callback, if the Wi-Fi network is unreachable, shows error message.
Bug: 127980127
Test: manual test
Change-Id: I503d6c77c1f1fcab3a1240d904f1c60aaef63aa1
1. Remove android:contentDescription from ButtonPreference layout file
'wifi_button_preference_widget.xml' because it should be a more
general purpose component. Add ButtonPreference#setButtonContentDescription
for this change.
2. Add a LinearLayout to group title & summary for better Talkback UX
3. Set android:contentDescription for Wi-Fi enrollee scan button
4. setTitle for Talkback actionbar back button of WifiDppQrCodeGeneratorFragment &
WifiDppQrCodeScannerFragment
5. Auto trigger Talkback to speak title & summary in WifiDppAddDeviceFragment &
WifiDppChooseSavedWifiNetworkFragment
6. Auto trigger Talkback to speak summary change in WifiDppAddDeviceFragment
7. Auto trigger Talkback to speak error message in WifiDppQrCodeScannerFragment
Bug: 126007405
Bug: 124424996
Bug: 124424445
Test: manual test
Change-Id: I54a3f033bb8871c47be12115ae8f97691fd83302
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. set fragment icon for WifiDppChooseSavedWifiNetworkFragment
2. set fragment icon of success for WifiDppAddDeviceFragment
All Wi-Fi DPP fragment icons are VectorDrawable of instinct size
24dp draw on a 48dp canvas. Except for ic_devices_check_circle_green,
it's a LayerDrawable of different size. I dynamically change ImageView
layout width & height between these 2 different kind of drawable.
Bug: 122982132
Test: manual test
Change-Id: Idab8cd8b0798363e447da00dc6bc68a86498b8be
1. Wi-Fi DPP hanshake fail UI
2. Show Wi-Fi DPP QR code information field on WifiDppAddDeviceFragment if it's available.
3. Click 'Choose Different Network' button will show WifiDppChooseSavedWifiNetworkFragment
4. After QR code scanner scans success, WifiDppConfiguratorActivity caches WifiQrCode instead
of just a QR code string
Bug: 122429170
Test: manual test
Change-Id: I1ce1b014ff86903b5a7a8f3575cc98eb1079583c
1. Use ConstraintLayout to fix footer buttons at bottom
2. ScrollViews have all other UI components excepts footer buttons
3. Use style/SuwGlifButton for buttons
4. Fix scan fragment crash when rotating screen
Bug: 118794978
Test: manual test
Change-Id: I509b0156c4835c75da75fb7ac4c82f55a0b506a1
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. WifiDppQrCodeBaseFragment only declairs common UI components between fragments.
2. Initiate UI components in onViewCreated of each View.
3. Remove the only one usage of @NonNull since it should be used consistently
throughout the class if we want to use it.
4. Use android.R.id for icon/title/summary
Bug: 120645817
Test: atest WifiDppConfiguratorActivityTest
atest WifiDppEnrolleeActivityTest
atest WifiDppQrCodeGeneratorFragmentTest
atest WifiDppQrCodeScannerFragmentTest
Change-Id: I54f99a3072533cec46f0e47753ee0331fecf2ada
1. Implements WifiNetworkConfig Wi-Fi connection method
2. Shows error message when the QR code is not valid and hides it after 2s
3. In configurator mode, launchs AddDeviceFragment for a valid QR code
4. In enrollee mode, connects Wi-Fi for a valid QR code
Bug: 118794978
Test: manual test
atest WifiQrCodetest
atest WifiDppConfiguratorActivityTest
atest WifiDppEnrolleeActivityTest
atest WifiDppQrCodeScannerFragmentTest
Change-Id: Ie4731b22df295c60906156d33ea28dad9c084ce4
1.Choose the smaller size of both dimensions as its size.
2.Set transform matrix to crop and center the preview picture.
Bug: 118797380
Test: make RunSettingsRoboTests
Change-Id: Ic65fb1fe0c5082995d6903f50dda48eec16c3fb1
WifiDppQrCodeScannerActivity is the activity for user to scan
QR code and add device to a saved network.
Bug: 118797380
Test: manual
Change-Id: If2c8c5ba1620e5584fb47ba7b0ea2bc2d7acb641