diff options
author | Irfan Sheriff <isheriff@google.com> | 2013-03-18 13:52:22 -0700 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2013-03-18 13:56:32 -0700 |
commit | 367a96b0f314a3818911fee2b90854ffb511bb75 (patch) | |
tree | 42cbd366da5f9aae7c064b1406477d1e65f38f83 /wifi/java/android/net | |
parent | 338b18844434379de54050ff582d36ff6da3ba11 (diff) | |
download | frameworks_base-367a96b0f314a3818911fee2b90854ffb511bb75.zip frameworks_base-367a96b0f314a3818911fee2b90854ffb511bb75.tar.gz frameworks_base-367a96b0f314a3818911fee2b90854ffb511bb75.tar.bz2 |
Fix tethering
Using sendMessageAtFrontofQueue() causes issues here since there can be a start
that is deferred and it basically has no effect. Use defer which is more clean
and obvious here.
Bug: 8410547
Change-Id: I4fbf299283847e7c3009b87a81cb56e765b0e1e1
Diffstat (limited to 'wifi/java/android/net')
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateMachine.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java index 8cdfe03..b57910f 100644 --- a/wifi/java/android/net/wifi/WifiStateMachine.java +++ b/wifi/java/android/net/wifi/WifiStateMachine.java @@ -3584,6 +3584,8 @@ public class WifiStateMachine extends StateMachine { setWifiApState(WIFI_AP_STATE_DISABLING); stopTethering(); transitionTo(mUntetheringState); + // More work to do after untethering + deferMessage(message); break; default: return NOT_HANDLED; @@ -3610,15 +3612,11 @@ public class WifiStateMachine extends StateMachine { if (isWifiTethered(stateChange.active)) break; transitionTo(mSoftApStartedState); - // Needs to be first thing handled - sendMessageAtFrontOfQueue(CMD_STOP_AP); break; case CMD_TETHER_NOTIFICATION_TIMED_OUT: if (message.arg1 == mTetherToken) { loge("Failed to get tether update, force stop access point"); transitionTo(mSoftApStartedState); - // Needs to be first thing handled - sendMessageAtFrontOfQueue(CMD_STOP_AP); } break; case CMD_START_SUPPLICANT: |