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

Commit b131c700 authored by Chong Zhang's avatar Chong Zhang
Browse files

Clear mPendingScreenOff and stop color fade animiation if screen is on

bug: 24116819
Change-Id: I4a962878001b00daf5473d90cbd257ac318c0446
parent 6f103310
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -840,8 +840,12 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
        // If there is already an animation in progress, don't interfere with it.
        if (mColorFadeOnAnimator.isStarted()
                || mColorFadeOffAnimator.isStarted()) {
            if (target != Display.STATE_ON) {
                return;
            }
            // If display state changed to on, proceed and stop the color fade and turn screen on.
            mPendingScreenOff = false;
        }

        // If we were in the process of turning off the screen but didn't quite
        // finish.  Then finish up now to prevent a jarring transition back