[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

@@ -0,0 +1,31 @@
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/
package com.android.settings.wifi;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.Robolectric;
import org.robolectric.RobolectricTestRunner;
@RunWith(RobolectricTestRunner.class)
public class WifiScanModeActivityTest {
@Test
public void launchActivity_noIntentAction_shouldNotFatalException() {
WifiScanModeActivity wifiScanModeActivity =
Robolectric.setupActivity(WifiScanModeActivity.class);
}
}