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

Commit b165ede8 authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

Remove scrim animation between AOD and OFF

Flag: NONE bugfix
Fixes: 333111452
Test: manually transition from display OFF to AOD by
blocking the prox sensor until display off, then
unblocking the prox sensor to go back to AOD (doze display
state)

Change-Id: I877c82787d4de014828722c686c021002518d081
parent 0400b8d4
Loading
Loading
Loading
Loading
+14 −6
Original line number Original line Diff line number Diff line
@@ -46,8 +46,12 @@ public enum ScrimState {
            mFrontAlpha = 1f;
            mFrontAlpha = 1f;
            mBehindAlpha = 1f;
            mBehindAlpha = 1f;


            if (previousState == AOD) {
                mAnimateChange = false;
            } else {
                mAnimationDuration = ScrimController.ANIMATION_DURATION_LONG;
                mAnimationDuration = ScrimController.ANIMATION_DURATION_LONG;
            }
            }
        }


        @Override
        @Override
        public boolean isLowPowerState() {
        public boolean isLowPowerState() {
@@ -193,12 +197,16 @@ public enum ScrimState {
            mBehindAlpha = ScrimController.TRANSPARENT;
            mBehindAlpha = ScrimController.TRANSPARENT;


            mAnimationDuration = ScrimController.ANIMATION_DURATION_LONG;
            mAnimationDuration = ScrimController.ANIMATION_DURATION_LONG;
            // DisplayPowerManager may blank the screen for us, or we might blank it for ourselves
            if (previousState == OFF) {
            // by animating the screen off via the LightRevelScrim. In either case we just need to
                mAnimateChange = false;
            } else {
                // DisplayPowerManager may blank the screen for us, or we might blank it by
                // animating the screen off via the LightRevelScrim. In either case we just need to
                // set our state.
                // set our state.
                mAnimateChange = mDozeParameters.shouldControlScreenOff()
                mAnimateChange = mDozeParameters.shouldControlScreenOff()
                        && !mDozeParameters.shouldShowLightRevealScrim();
                        && !mDozeParameters.shouldShowLightRevealScrim();
            }
            }
        }


        @Override
        @Override
        public float getMaxLightRevealScrimAlpha() {
        public float getMaxLightRevealScrimAlpha() {