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

Commit 0cec0764 authored by William Leshner's avatar William Leshner Committed by Automerger Merge Worker
Browse files

Merge "Fix a flicker when short pressing power button." into tm-qpr-dev am:...

Merge "Fix a flicker when short pressing power button." into tm-qpr-dev am: 75b95761 am: 5ed45028

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20729058



Change-Id: I272c53a364453b701da3363b68210a1899d6ba40
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents ffbc3d45 5ed45028
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1056,12 +1056,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            return;
        }

        // Make sure the device locks. Unfortunately, this has the side-effect of briefly revealing
        // the lock screen before the dream appears. Note that this locking behavior needs to
        // happen regardless of whether we end up dreaming (below) or not.
        // TODO(b/261662912): Find a better way to lock the device that doesn't result in jank.
        lockNow(null);

        // Don't dream if the user isn't user zero.
        // TODO(b/261907079): Move this check to DreamManagerService#canStartDreamingInternal().
        if (ActivityManager.getCurrentUser() != UserHandle.USER_SYSTEM) {
@@ -1075,6 +1069,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            return;
        }

        // Make sure the device locks. Unfortunately, this has the side-effect of briefly revealing
        // the lock screen before the dream appears. Note that locking is a side-effect of the no
        // dream action that is executed if we early return above.
        // TODO(b/261662912): Find a better way to lock the device that doesn't result in jank.
        lockNow(null);

        dreamManagerInternal.requestDream();
    }