Merge "Show security screen for ACTION_PROCESS_WIFI_EASY_CONNECT_URI intent" into sc-dev am: 5f876de174

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14292670

Change-Id: Ib54669896cf9c50d02f13d33a44c123679acbf80
This commit is contained in:
TreeHugger Robot
2021-04-26 07:38:20 +00:00
committed by Automerger Merge Worker

View File

@@ -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() {