summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index 95983096a..9f4c41f83 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -5013,11 +5013,12 @@ public class ClientModeImpl extends StateMachine {
&& mLastNetworkId != WifiConfiguration.INVALID_NETWORK_ID) {
WifiConfiguration config =
mWifiConfigManager.getConfiguredNetwork(mLastNetworkId);
- if ((message.arg1 == RESET_SIM_REASON_DEFAULT_DATA_SIM_CHANGED
+ if (config != null
+ && ((message.arg1 == RESET_SIM_REASON_DEFAULT_DATA_SIM_CHANGED
&& config.carrierId != TelephonyManager.UNKNOWN_CARRIER_ID)
|| (config.enterpriseConfig != null
&& config.enterpriseConfig.isAuthenticationSimBased()
- && !mWifiCarrierInfoManager.isSimPresent(mLastSubId))) {
+ && !mWifiCarrierInfoManager.isSimPresent(mLastSubId)))) {
mWifiMetrics.logStaEvent(StaEvent.TYPE_FRAMEWORK_DISCONNECT,
StaEvent.DISCONNECT_RESET_SIM_NETWORKS);
// remove local PMKSA cache in framework