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

Commit e93b87f1 authored by Beverly's avatar Beverly
Browse files

PreDraw scrim on AOD -> UNLOCKED

Scheduling a frame isn't enough when directly transitioning to unlocked
from AOD (ie: security is set to None), need to update the scrim
immediatley so that the nav bar has the correct color.

Test: manual
Bug: 177238312
Change-Id: Ibe50e9749439ef1f31ac098af3da067a30f97861
parent c31ec3d5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -370,13 +370,15 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
        if (mKeyguardUpdateMonitor.needsSlowUnlockTransition() && mState == ScrimState.UNLOCKED) {
            mAnimationDelay = StatusBar.FADE_KEYGUARD_START_DELAY;
            scheduleUpdate();
        } else if ((!mDozeParameters.getAlwaysOn() && oldState == ScrimState.AOD)
        } else if ((oldState == ScrimState.AOD  // leaving doze
                && (!mDozeParameters.getAlwaysOn() || mState == ScrimState.UNLOCKED))
                || (mState == ScrimState.AOD && !mDozeParameters.getDisplayNeedsBlanking())) {
            // Scheduling a frame isn't enough when:
            //  • Leaving doze and we need to modify scrim color immediately
            //  • ColorFade will not kick-in and scrim cannot wait for pre-draw.
            onPreDraw();
        } else {
            // Schedule a frame
            scheduleUpdate();
        }