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

Commit a7e0e71c authored by Kun Liang's avatar Kun Liang Committed by Steve Kondik
Browse files

WifiState: Don't aquire transitionwakelock in airplane mode

NetworkTransitionWakelock is for transition from Wifi to mobile.
It will cause device no sleep for 60s. There is no need to acquire
it in airplane mode.

Change-Id: I1487dc4787948d09e482f22e88d01768b54964da
parent 50e7cdb2
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -3938,11 +3938,14 @@ public class WifiStateMachine extends StateMachine {
        }
        @Override
        public void exit() {
            if (Settings.Global.getInt(mContext.getContentResolver(),
                    Settings.Global.AIRPLANE_MODE_ON, 0) != 1) {
                /* Request a CS wakelock during transition to mobile */
                checkAndSetConnectivityInstance();
                mCm.requestNetworkTransitionWakelock(getName());
            }
        }
    }

    class DisconnectingState extends State {
        @Override