From 0117b995f44758a64b7af6d2d11e17d10ef125ce Mon Sep 17 00:00:00 2001 From: Ningyuan Wang Date: Fri, 3 Nov 2017 11:16:56 -0700 Subject: [PATCH] Enforce null check for mAccessPoint mAccessPoint == null implies this is a new network. In this case, we don't need to check if it's a carrier AP. Bug: 68846574 Test: compile, manually test that crash does not happen again. Test: make RunSettingsRoboTests -j40 aROBOTEST_FILTER=WifiConfigControllerTest Change-Id: I03b1da5e8f0b8e4270c0c52c67bbc90c999be078 --- src/com/android/settings/wifi/WifiConfigController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/wifi/WifiConfigController.java b/src/com/android/settings/wifi/WifiConfigController.java index 8ee340aca01..2e3a45470dd 100644 --- a/src/com/android/settings/wifi/WifiConfigController.java +++ b/src/com/android/settings/wifi/WifiConfigController.java @@ -1030,7 +1030,7 @@ public class WifiConfigController implements TextWatcher, setUserCertInvisible(); setPasswordInvisible(); setIdentityInvisible(); - if (mAccessPoint.isCarrierAp()) { + if (mAccessPoint != null && mAccessPoint.isCarrierAp()) { setEapMethodInvisible(); } break;