[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:
Arc Wang
2019-08-22 10:28:55 +08:00
parent 6ef36e9c34
commit 1e451cf708
8 changed files with 143 additions and 7 deletions

View File

@@ -55,9 +55,9 @@ public final class WifiNoInternetDialog extends AlertActivity implements
private boolean mButtonClicked;
private boolean isKnownAction(Intent intent) {
return intent.getAction().equals(ACTION_PROMPT_UNVALIDATED)
|| intent.getAction().equals(ACTION_PROMPT_LOST_VALIDATION)
|| intent.getAction().equals(ACTION_PROMPT_PARTIAL_CONNECTIVITY);
return ACTION_PROMPT_UNVALIDATED.equals(intent.getAction())
|| ACTION_PROMPT_LOST_VALIDATION.equals(intent.getAction())
|| ACTION_PROMPT_PARTIAL_CONNECTIVITY.equals(intent.getAction());
}
@Override