Show security screen for ACTION_PROCESS_WIFI_EASY_CONNECT_URI intent
Bug: 183181987 Test: manual test make RunSettingsRoboTests ROBOTEST_FILTER=WifiDppConfiguratorActivityTest Change-Id: I26e97142cc1c30909bd14eb85d466442274446a9
This commit is contained in:
@@ -144,6 +144,20 @@ public class WifiDppConfiguratorActivity extends WifiDppBaseActivity implements
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Settings.ACTION_PROCESS_WIFI_EASY_CONNECT_URI:
|
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 Uri uri = intent.getData();
|
||||||
final String uriString = (uri == null) ? null : uri.toString();
|
final String uriString = (uri == null) ? null : uri.toString();
|
||||||
mWifiDppQrCode = WifiQrCode.getValidWifiDppQrCodeOrNull(uriString);
|
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!");
|
Log.e(TAG, "ACTION_PROCESS_WIFI_EASY_CONNECT_URI with null URI!");
|
||||||
}
|
}
|
||||||
if (mWifiDppQrCode == null || !isDppSupported) {
|
if (mWifiDppQrCode == null || !isDppSupported) {
|
||||||
cancelActivity = true;
|
finish();
|
||||||
} else {
|
} else {
|
||||||
final WifiNetworkConfig connectedConfig = getConnectedWifiNetworkConfigOrNull();
|
final WifiNetworkConfig connectedConfig = getConnectedWifiNetworkConfigOrNull();
|
||||||
if (connectedConfig == null || !connectedConfig.isSupportWifiDpp(this)) {
|
if (connectedConfig == null || !connectedConfig.isSupportWifiDpp(this)) {
|
||||||
@@ -169,15 +183,6 @@ public class WifiDppConfiguratorActivity extends WifiDppBaseActivity implements
|
|||||||
showAddDeviceFragment(/* addToBackStack */ false);
|
showAddDeviceFragment(/* addToBackStack */ false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
default:
|
|
||||||
cancelActivity = true;
|
|
||||||
Log.e(TAG, "Launch with an invalid action");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cancelActivity) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showQrCodeScannerFragment() {
|
private void showQrCodeScannerFragment() {
|
||||||
|
Reference in New Issue
Block a user