diff options
author | Rebecca Silberstein <silberst@google.com> | 2017-09-27 17:19:51 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-09-27 17:19:51 +0000 |
commit | 75dc8a494a00a37d19772220fdc639abc05ea3d0 (patch) | |
tree | 37f414a60c8ef5dc65b637053d16627f15232942 /service | |
parent | a32e2000025fb2df125c3d14c2fa55ddecd4b790 (diff) | |
parent | e416f1b0ebc69d02147f72599fe41d5a045ca2d3 (diff) |
Merge "WifiStateMachine: check for null config after dhcp" into oc-mr1-dev
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiStateMachine.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java index faad0e2d1..e96c15dad 100644 --- a/service/java/com/android/server/wifi/WifiStateMachine.java +++ b/service/java/com/android/server/wifi/WifiStateMachine.java @@ -4824,7 +4824,7 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiRss // Notify PasspointManager of Passpoint network connected event. WifiConfiguration currentNetwork = getCurrentWifiConfiguration(); - if (currentNetwork.isPasspoint()) { + if (currentNetwork != null && currentNetwork.isPasspoint()) { mPasspointManager.onPasspointNetworkConnected(currentNetwork.FQDN); } } @@ -5831,8 +5831,15 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiRss reportConnectionAttemptEnd( WifiMetrics.ConnectionEvent.FAILURE_NONE, WifiMetricsProto.ConnectionEvent.HLF_NONE); - sendConnectedState(); - transitionTo(mConnectedState); + if (getCurrentWifiConfiguration() == null) { + // The current config may have been removed while we were connecting, + // trigger a disconnect to clear up state. + mWifiNative.disconnect(); + transitionTo(mDisconnectingState); + } else { + sendConnectedState(); + transitionTo(mConnectedState); + } break; case CMD_IP_CONFIGURATION_LOST: // Get Link layer stats so that we get fresh tx packet counters. |