Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6071c33 authored by Irfan Sheriff's avatar Irfan Sheriff Committed by Android Git Automerger
Browse files

am 8c2122cb: am a85cc282: Merge "Fix CS wakelock handling" into ics-mr1

* commit '8c2122cb':
  Fix CS wakelock handling
parents 63051d71 8c2122cb
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1078,7 +1078,6 @@ public class WifiService extends IWifiManager.Stub {
                mWifiStateMachine.setHighPerfModeEnabled(strongestLockMode
                        == WifiManager.WIFI_MODE_FULL_HIGH_PERF);
            } else {
                mWifiStateMachine.requestCmWakeLock();
                mWifiStateMachine.setDriverStart(false);
            }
        } else {
+5 −16
Original line number Diff line number Diff line
@@ -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
             */