[DPP] Read the remote band support EXTRA
Bug: 139381558 Test: use demo app (WifiEasyConnect.apk) to send information, observe logs Change-Id: I23a6e90c450c4b094000fb16c3c2f89eea3b0ef9
This commit is contained in:
@@ -78,6 +78,16 @@ public class WifiDppConfiguratorActivity extends WifiDppBaseActivity implements
|
||||
/** The Wi-Fi DPP QR code from intent ACTION_PROCESS_WIFI_EASY_CONNECT_URI */
|
||||
private WifiQrCode mWifiDppQrCode;
|
||||
|
||||
/**
|
||||
* The remote device's band support obtained as an (optional) extra
|
||||
* EXTRA_EASY_CONNECT_BAND_LIST from the intent ACTION_PROCESS_WIFI_EASY_CONNECT_URI.
|
||||
*
|
||||
* The band support is provided as IEEE 802.11 Global Operating Classes. There may be a single
|
||||
* or multiple operating classes specified. The array may also be a null if the extra wasn't
|
||||
* specified.
|
||||
*/
|
||||
private int[] mWifiDppRemoteBandSupport;
|
||||
|
||||
/** Secret extra that allows fake networks to show in UI for testing purposes */
|
||||
private boolean mIsTest;
|
||||
|
||||
@@ -141,9 +151,16 @@ public class WifiDppConfiguratorActivity extends WifiDppBaseActivity implements
|
||||
final String uriString = (uri == null) ? null : uri.toString();
|
||||
mIsTest = intent.getBooleanExtra(WifiDppUtils.EXTRA_TEST, false);
|
||||
mWifiDppQrCode = WifiQrCode.getValidWifiDppQrCodeOrNull(uriString);
|
||||
mWifiDppRemoteBandSupport = intent.getIntArrayExtra(
|
||||
Settings.EXTRA_EASY_CONNECT_BAND_LIST); // returns null if none
|
||||
final boolean isDppSupported = WifiDppUtils.isWifiDppEnabled(this);
|
||||
if (!isDppSupported) {
|
||||
Log.d(TAG, "Device doesn't support Wifi DPP");
|
||||
Log.e(TAG,
|
||||
"ACTION_PROCESS_WIFI_EASY_CONNECT_URI for a device that doesn't "
|
||||
+ "support Wifi DPP - use WifiManager#isEasyConnectSupported");
|
||||
}
|
||||
if (mWifiDppQrCode == null) {
|
||||
Log.e(TAG, "ACTION_PROCESS_WIFI_EASY_CONNECT_URI with null URI!");
|
||||
}
|
||||
if (mWifiDppQrCode == null || !isDppSupported) {
|
||||
cancelActivity = true;
|
||||
|
Reference in New Issue
Block a user