Implement Wi-Fi DPP flow
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
This commit is contained in:
@@ -64,6 +64,9 @@ public class WifiDppUtils {
|
||||
/** The data corresponding to {@code WifiConfiguration} hiddenSSID */
|
||||
public static final String EXTRA_WIFI_HIDDEN_SSID = "hiddenSsid";
|
||||
|
||||
/** The data corresponding to {@code WifiConfiguration} networkId */
|
||||
public static final String EXTRA_WIFI_NETWORK_ID = "networkId";
|
||||
|
||||
/** @see WifiQrCode */
|
||||
public static final String EXTRA_QR_CODE = "qrCode";
|
||||
|
||||
@@ -164,6 +167,11 @@ public class WifiDppUtils {
|
||||
if (!TextUtils.isEmpty(preSharedKey)) {
|
||||
intent.putExtra(EXTRA_WIFI_PRE_SHARED_KEY, preSharedKey);
|
||||
}
|
||||
if (wifiConfig.networkId == WifiConfiguration.INVALID_NETWORK_ID) {
|
||||
throw new IllegalArgumentException("Invalid network ID");
|
||||
} else {
|
||||
intent.putExtra(EXTRA_WIFI_NETWORK_ID, wifiConfig.networkId);
|
||||
}
|
||||
|
||||
return intent;
|
||||
}
|
||||
|
Reference in New Issue
Block a user