Improve UX of Wi-Fi QR code scanner enrollee flow

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
This commit is contained in:
Arc Wang
2019-02-21 19:41:23 +08:00
parent 5f321d7921
commit 13f37337ed
7 changed files with 135 additions and 26 deletions

View File

@@ -95,6 +95,11 @@ public class WifiDppUtils {
/**
* Returns an intent to launch QR code scanner for Wi-Fi DPP enrollee.
*
* After enrollee success, the callee activity will return connecting WifiConfiguration by
* putExtra {@code WifiDialogActivity.KEY_WIFI_CONFIGURATION} for
* {@code Activity#setResult(int resultCode, Intent data)}. The calling object should check
* if it's available before using it.
*
* @param ssid The data corresponding to {@code WifiConfiguration} SSID
* @return Intent for launching QR code scanner
*/