Merge "Show security screen for ACTION_PROCESS_WIFI_EASY_CONNECT_URI intent" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5f876de174
@@ -144,6 +144,20 @@ public class WifiDppConfiguratorActivity extends WifiDppBaseActivity implements
|
||||
}
|
||||
break;
|
||||
case Settings.ACTION_PROCESS_WIFI_EASY_CONNECT_URI:
|
||||
WifiDppUtils.showLockScreen(this,
|
||||
() -> handleActionProcessWifiEasyConnectUriIntent(intent));
|
||||
break;
|
||||
default:
|
||||
cancelActivity = true;
|
||||
Log.e(TAG, "Launch with an invalid action");
|
||||
}
|
||||
|
||||
if (cancelActivity) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
private void handleActionProcessWifiEasyConnectUriIntent(Intent intent) {
|
||||
final Uri uri = intent.getData();
|
||||
final String uriString = (uri == null) ? null : uri.toString();
|
||||
mWifiDppQrCode = WifiQrCode.getValidWifiDppQrCodeOrNull(uriString);
|
||||
@@ -159,7 +173,7 @@ public class WifiDppConfiguratorActivity extends WifiDppBaseActivity implements
|
||||
Log.e(TAG, "ACTION_PROCESS_WIFI_EASY_CONNECT_URI with null URI!");
|
||||
}
|
||||
if (mWifiDppQrCode == null || !isDppSupported) {
|
||||
cancelActivity = true;
|
||||
finish();
|
||||
} else {
|
||||
final WifiNetworkConfig connectedConfig = getConnectedWifiNetworkConfigOrNull();
|
||||
if (connectedConfig == null || !connectedConfig.isSupportWifiDpp(this)) {
|
||||
@@ -169,15 +183,6 @@ public class WifiDppConfiguratorActivity extends WifiDppBaseActivity implements
|
||||
showAddDeviceFragment(/* addToBackStack */ false);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
cancelActivity = true;
|
||||
Log.e(TAG, "Launch with an invalid action");
|
||||
}
|
||||
|
||||
if (cancelActivity) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
private void showQrCodeScannerFragment() {
|
||||
|
Reference in New Issue
Block a user