[Wi-Fi] Prevent fatal exception for null intent action
Intent action may be null. Bug: 139020487 Test: WifiScanModeActivityTest WifiNoInternetDialogTest WifiDppConfiguratorActivityTest WifiDppEnrolleeActivityTest Change-Id: Ie6119a86aaee1a6b40710705a0ea7d92c24736d6
This commit is contained in:
@@ -109,9 +109,15 @@ public class WifiDppConfiguratorActivity extends WifiDppBaseActivity implements
|
||||
|
||||
@Override
|
||||
protected void handleIntent(Intent intent) {
|
||||
String action = intent != null ? intent.getAction() : null;
|
||||
if (action == null) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
boolean cancelActivity = false;
|
||||
WifiNetworkConfig config;
|
||||
switch (intent.getAction()) {
|
||||
switch (action) {
|
||||
case ACTION_CONFIGURATOR_QR_CODE_SCANNER:
|
||||
config = WifiNetworkConfig.getValidConfigOrNull(intent);
|
||||
if (config == null) {
|
||||
|
Reference in New Issue
Block a user