diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2013-04-04 15:51:08 -0700 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2013-04-12 12:44:56 -0700 |
commit | a05e4583af6d43f5d19fd6f508501bc43ccfcd5b (patch) | |
tree | 3dff58b1d812812a9e5a2db2bdb2b3b69b19ab9e /wifi | |
parent | 3016244ffb0ee59a191b294839468a81b45a01f1 (diff) | |
download | frameworks_base-a05e4583af6d43f5d19fd6f508501bc43ccfcd5b.zip frameworks_base-a05e4583af6d43f5d19fd6f508501bc43ccfcd5b.tar.gz frameworks_base-a05e4583af6d43f5d19fd6f508501bc43ccfcd5b.tar.bz2 |
Disconnect from AP when teardown requested.
We can leave the driver running if it can't handle quick
start/stop cycles, but we must disconnect when requested.
Bug:8549078
Change-Id: Id2e930fb48ca78bb459b775cba7e9aa31a6c9941
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateMachine.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java index 04e7095..a5d98cc 100644 --- a/wifi/java/android/net/wifi/WifiStateMachine.java +++ b/wifi/java/android/net/wifi/WifiStateMachine.java @@ -2442,6 +2442,9 @@ public class WifiStateMachine extends StateMachine { if (DBG) log("Already in delayed stop"); break; } + /* disconnect right now, but leave the driver running for a bit */ + mWifiConfigStore.disableAllNetworks(); + mInDelayedStop = true; mDelayedStopCounter++; if (DBG) log("Delayed stop message " + mDelayedStopCounter); @@ -2462,6 +2465,9 @@ public class WifiStateMachine extends StateMachine { mDelayedStopCounter++; mAlarmManager.cancel(mDriverStopIntent); if (DBG) log("Delayed stop ignored due to start"); + if (mOperationalMode == CONNECT_MODE) { + mWifiConfigStore.enableAllNetworks(); + } } break; case CMD_DELAYED_STOP_DRIVER: |