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

Commit b2694d23 authored by Beverly Tai's avatar Beverly Tai Committed by Automerger Merge Worker
Browse files

Merge "Cannot determine Doze state during transition" into sc-dev am: 18f543c5

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

Change-Id: Idcdd357f8bd59d34e0608ec720bfccc63995ee83
parents 897f0cca 18f543c5
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -531,9 +531,13 @@ public class DozeTriggers implements DozeMachine.Part {
        Assert.isMainThread();
        mDozeHost.extendPulse(reason);

        // we can't determine the dozing state if we're currently transitioning
        final DozeMachine.State dozeState =
                mMachine.isExecutingTransition() ? null : mMachine.getState();

        // When already pulsing we're allowed to show the wallpaper directly without
        // requesting a new pulse.
        if (mMachine.getState() == DozeMachine.State.DOZE_PULSING
        if (dozeState == DozeMachine.State.DOZE_PULSING
                && reason == DozeLog.PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN) {
            mMachine.requestState(DozeMachine.State.DOZE_PULSING_BRIGHT);
            return;
@@ -541,8 +545,7 @@ public class DozeTriggers implements DozeMachine.Part {

        if (mPulsePending || !mAllowPulseTriggers || !canPulse()) {
            if (mAllowPulseTriggers) {
                mDozeLog.tracePulseDropped(mPulsePending, mMachine.getState(),
                        mDozeHost.isPulsingBlocked());
                mDozeLog.tracePulseDropped(mPulsePending, dozeState, mDozeHost.isPulsingBlocked());
            }
            runIfNotNull(onPulseSuppressedListener);
            return;