diff options
author | Irfan Sheriff <isheriff@google.com> | 2011-06-16 14:40:48 -0700 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2011-06-16 15:02:17 -0700 |
commit | e1f9064e356a07a08222c8c4a588969b4c0a8c99 (patch) | |
tree | 49034de66c217f9e89b91faba9803a1eb4c16d14 /wifi/java/android | |
parent | c1f9486a3ebff71a686ed6ae89e55ec7df8e16ba (diff) | |
download | frameworks_base-e1f9064e356a07a08222c8c4a588969b4c0a8c99.zip frameworks_base-e1f9064e356a07a08222c8c4a588969b4c0a8c99.tar.gz frameworks_base-e1f9064e356a07a08222c8c4a588969b4c0a8c99.tar.bz2 |
Fix network state handling
Change I242cda97 introduced a regression where network state
was being modified on any supplicant state change.
Revert the old behavior of only changeing network detailed state
based on supplicant state change in a disconnected state
Bug: 4690073
Change-Id: I927cc5fa36b862cc54661b033939f543cd15d31f
Diffstat (limited to 'wifi/java/android')
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateMachine.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java index 4f5349a..3c9a641 100644 --- a/wifi/java/android/net/wifi/WifiStateMachine.java +++ b/wifi/java/android/net/wifi/WifiStateMachine.java @@ -1438,7 +1438,6 @@ public class WifiStateMachine extends StateMachine { /* BSSID is valid only in ASSOCIATING state */ mWifiInfo.setBSSID(stateChangeResult.BSSID); } - setNetworkDetailedState(WifiInfo.getDetailedStateOf(state)); mSupplicantStateTracker.sendMessage(Message.obtain(message)); mWpsStateMachine.sendMessage(Message.obtain(message)); @@ -2975,7 +2974,12 @@ public class WifiStateMachine extends StateMachine { /* Ignore network disconnect */ case NETWORK_DISCONNECTION_EVENT: break; - case CMD_START_SCAN: + case SUPPLICANT_STATE_CHANGE_EVENT: + StateChangeResult stateChangeResult = (StateChangeResult) message.obj; + setNetworkDetailedState(WifiInfo.getDetailedStateOf(stateChangeResult.state)); + /* ConnectModeState does the rest of the handling */ + return NOT_HANDLED; + case CMD_START_SCAN: /* Disable background scan temporarily during a regular scan */ if (mEnableBackgroundScan) { WifiNative.enableBackgroundScanCommand(false); |