summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2011-12-07 11:25:21 -0800
committerIrfan Sheriff <isheriff@google.com>2011-12-07 11:28:21 -0800
commit87f0a7b1aa3fcd688358f92389d3eeaf1ae99008 (patch)
tree457168e3f5f5a1cb4ead57573bcd5eb2b81fd15a /wifi
parentfb90df8c6e6d48c4b6701014a3053915b94f4b9e (diff)
downloadframeworks_base-87f0a7b1aa3fcd688358f92389d3eeaf1ae99008.zip
frameworks_base-87f0a7b1aa3fcd688358f92389d3eeaf1ae99008.tar.gz
frameworks_base-87f0a7b1aa3fcd688358f92389d3eeaf1ae99008.tar.bz2
Fix CS wakelock handling
Change-Id: Ibe1c1ab3e26ff0ae7cab7bfb0bd868bfab246037
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiStateMachine.java21
1 files changed, 5 insertions, 16 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java
index 3ed9bd5..8f807fe 100644
--- a/wifi/java/android/net/wifi/WifiStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiStateMachine.java
@@ -306,8 +306,6 @@ public class WifiStateMachine extends StateMachine {
static final int CMD_SET_HIGH_PERF_MODE = BASE + 77;
/* Set the country code */
static final int CMD_SET_COUNTRY_CODE = BASE + 80;
- /* Request connectivity manager wake lock before driver stop */
- static final int CMD_REQUEST_CM_WAKELOCK = BASE + 81;
/* Enables RSSI poll */
static final int CMD_ENABLE_RSSI_POLL = BASE + 82;
/* RSSI poll */
@@ -1061,15 +1059,6 @@ public class WifiStateMachine extends StateMachine {
return result;
}
- /**
- * Request a wakelock with connectivity service to
- * keep the device awake until we hand-off from wifi
- * to an alternate network
- */
- public void requestCmWakeLock() {
- sendMessage(CMD_REQUEST_CM_WAKELOCK);
- }
-
public void updateBatteryWorkSource(WorkSource newSource) {
synchronized (mRunningWifiUids) {
try {
@@ -1867,7 +1856,6 @@ public class WifiStateMachine extends StateMachine {
case CMD_SET_HIGH_PERF_MODE:
case CMD_SET_COUNTRY_CODE:
case CMD_SET_FREQUENCY_BAND:
- case CMD_REQUEST_CM_WAKELOCK:
case CMD_CONNECT_NETWORK:
case CMD_SAVE_NETWORK:
case CMD_FORGET_NETWORK:
@@ -3024,10 +3012,6 @@ public class WifiStateMachine extends StateMachine {
WifiNative.disconnectCommand();
transitionTo(mDisconnectingState);
break;
- case CMD_REQUEST_CM_WAKELOCK:
- checkAndSetConnectivityInstance();
- mCm.requestNetworkTransitionWakelock(TAG);
- break;
case CMD_SET_SCAN_MODE:
if (message.arg1 == SCAN_ONLY_MODE) {
sendMessage(CMD_DISCONNECT);
@@ -3100,6 +3084,11 @@ public class WifiStateMachine extends StateMachine {
}
@Override
public void exit() {
+
+ /* Request a CS wakelock during transition to mobile */
+ checkAndSetConnectivityInstance();
+ mCm.requestNetworkTransitionWakelock(TAG);
+
/* If a scan result is pending in connected state, the supplicant
* is in SCAN_ONLY_MODE. Restore CONNECT_MODE on exit
*/