diff options
author | Irfan Sheriff <isheriff@google.com> | 2011-10-20 14:38:54 -0700 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2011-10-20 14:38:54 -0700 |
commit | 2d57d860c2ddf792f4afd6101c19a6d0cf01547c (patch) | |
tree | d39fdbc3f1f07e4e3848ec9958bb73e56affdb07 /wifi | |
parent | 7ec4284ab2026a82e6904a4974db8f947c159960 (diff) | |
download | frameworks_base-2d57d860c2ddf792f4afd6101c19a6d0cf01547c.zip frameworks_base-2d57d860c2ddf792f4afd6101c19a6d0cf01547c.tar.gz frameworks_base-2d57d860c2ddf792f4afd6101c19a6d0cf01547c.tar.bz2 |
Fix handling in DisconnectingState
Now that we also handle supplicant state change to identify that
a network is disconnected (in case CTRL-EVENT-DISCONNECTED goes missing),
it is dangerous to defer all supplicant state change messages
while in DisconnectingState.
It may happen that the CTRL-EVENT-DISCONNECTED goes missing while in
DisconnectingState resulting in a supplicant state change of 0 (disconnect)
getting deferred.
Eventually after a connection completes, the supplicant state change events
get handled and the state machine goes into DisconnectedState.
Fix by having state machine switch out of DisconnectingState once we
do not immediately see a CTRL-EVENT-DISCONNECTED state.
Bug: 5490789
Change-Id: Ia2263795e53c51da0a2bfeefecfeb6256d6c5267
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateMachine.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java index b76f8b9..e981da7 100644 --- a/wifi/java/android/net/wifi/WifiStateMachine.java +++ b/wifi/java/android/net/wifi/WifiStateMachine.java @@ -3043,9 +3043,14 @@ public class WifiStateMachine extends StateMachine { deferMessage(message); } break; - /* Handle in DisconnectedState */ case WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT: + /* If we get a SUPPLICANT_STATE_CHANGE_EVENT before NETWORK_DISCONNECTION_EVENT + * we have missed the network disconnection, transition to mDisconnectedState + * and handle the rest of the events there + */ deferMessage(message); + handleNetworkDisconnect(); + transitionTo(mDisconnectedState); break; default: return NOT_HANDLED; |