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

Commit efe90f8d authored by Jorim Jaggi's avatar Jorim Jaggi Committed by android-build-merger
Browse files

Merge "Also go to sleep when dozing" into oc-dr1-dev

am: be1577ae

Change-Id: If8fea9defc84fcd3f7f8f2c98dcb00f13f7ffffc
parents de93e691 be1577ae
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -12460,10 +12460,10 @@ public class ActivityManagerService extends IActivityManager.Stub
        switch (mWakefulness) {
        switch (mWakefulness) {
            case PowerManagerInternal.WAKEFULNESS_AWAKE:
            case PowerManagerInternal.WAKEFULNESS_AWAKE:
            case PowerManagerInternal.WAKEFULNESS_DREAMING:
            case PowerManagerInternal.WAKEFULNESS_DREAMING:
            case PowerManagerInternal.WAKEFULNESS_DOZING:
                // Pause applications whenever the lock screen is shown or any sleep
                // Pause applications whenever the lock screen is shown or any sleep
                // tokens have been acquired.
                // tokens have been acquired.
                return mKeyguardController.isKeyguardShowing() || !mSleepTokens.isEmpty();
                return mKeyguardController.isKeyguardShowing() || !mSleepTokens.isEmpty();
            case PowerManagerInternal.WAKEFULNESS_DOZING:
            case PowerManagerInternal.WAKEFULNESS_ASLEEP:
            case PowerManagerInternal.WAKEFULNESS_ASLEEP:
            default:
            default:
                // If we're asleep then pause applications unconditionally.
                // If we're asleep then pause applications unconditionally.