@@ -306,8 +306,6 @@ public class WifiStateMachine extends StateMachine {
306306 static final int CMD_SET_HIGH_PERF_MODE = BASE + 77 ;
307307 /* Set the country code */
308308 static final int CMD_SET_COUNTRY_CODE = BASE + 80 ;
309- /* Request connectivity manager wake lock before driver stop */
310- static final int CMD_REQUEST_CM_WAKELOCK = BASE + 81 ;
311309 /* Enables RSSI poll */
312310 static final int CMD_ENABLE_RSSI_POLL = BASE + 82 ;
313311 /* RSSI poll */
@@ -1061,15 +1059,6 @@ public boolean syncSaveConfig(AsyncChannel channel) {
10611059 return result ;
10621060 }
10631061
1064- /**
1065- * Request a wakelock with connectivity service to
1066- * keep the device awake until we hand-off from wifi
1067- * to an alternate network
1068- */
1069- public void requestCmWakeLock () {
1070- sendMessage (CMD_REQUEST_CM_WAKELOCK );
1071- }
1072-
10731062 public void updateBatteryWorkSource (WorkSource newSource ) {
10741063 synchronized (mRunningWifiUids ) {
10751064 try {
@@ -1867,7 +1856,6 @@ public boolean processMessage(Message message) {
18671856 case CMD_SET_HIGH_PERF_MODE :
18681857 case CMD_SET_COUNTRY_CODE :
18691858 case CMD_SET_FREQUENCY_BAND :
1870- case CMD_REQUEST_CM_WAKELOCK :
18711859 case CMD_CONNECT_NETWORK :
18721860 case CMD_SAVE_NETWORK :
18731861 case CMD_FORGET_NETWORK :
@@ -3024,10 +3012,6 @@ public boolean processMessage(Message message) {
30243012 WifiNative .disconnectCommand ();
30253013 transitionTo (mDisconnectingState );
30263014 break ;
3027- case CMD_REQUEST_CM_WAKELOCK :
3028- checkAndSetConnectivityInstance ();
3029- mCm .requestNetworkTransitionWakelock (TAG );
3030- break ;
30313015 case CMD_SET_SCAN_MODE :
30323016 if (message .arg1 == SCAN_ONLY_MODE ) {
30333017 sendMessage (CMD_DISCONNECT );
@@ -3100,6 +3084,11 @@ public boolean processMessage(Message message) {
31003084 }
31013085 @ Override
31023086 public void exit () {
3087+
3088+ /* Request a CS wakelock during transition to mobile */
3089+ checkAndSetConnectivityInstance ();
3090+ mCm .requestNetworkTransitionWakelock (TAG );
3091+
31033092 /* If a scan result is pending in connected state, the supplicant
31043093 * is in SCAN_ONLY_MODE. Restore CONNECT_MODE on exit
31053094 */
0 commit comments