diff options
author | Glen Kuhne <kuh@google.com> | 2017-04-03 09:24:33 -0700 |
---|---|---|
committer | Glen Kuhne <kuh@google.com> | 2017-04-05 13:16:54 -0700 |
commit | c46316ffd330a903c70734dc7922410951a0f7a8 (patch) | |
tree | be0e775d5f2be66a92eb53553097717071ad17c0 /service | |
parent | 31eb1e8997a0ee98df33f6d8b3b907e0fcb070ed (diff) |
Fix null exception error
Added a missing null check that was causing rare framework reset bug.
Bug: 36625896
Test: Existing Unit tests
Change-Id: I3aac9b8e629bbe288d191aef783651837f36095e
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiStateMachine.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java index 6e5da1716..1fe895ea5 100644 --- a/service/java/com/android/server/wifi/WifiStateMachine.java +++ b/service/java/com/android/server/wifi/WifiStateMachine.java @@ -5804,7 +5804,9 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiRss // If this network was explicitly selected by the user, evaluate whether to call // explicitlySelected() so the system can treat it appropriately. WifiConfiguration config = getCurrentWifiConfiguration(); - if (mWifiConfigManager.getLastSelectedNetwork() == config.networkId) { + if (config == null) { + Log.wtf(TAG, "Current WifiConfiguration is null, but IP provisioning just succeeded"); + } else if (mWifiConfigManager.getLastSelectedNetwork() == config.networkId) { boolean prompt = mWifiPermissionsUtil.checkConfigOverridePermission(config.lastConnectUid); if (mVerboseLoggingEnabled) { |