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

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

Merge "Remove scrim animation between AOD and OFF" into 24D1-dev am: a354b1cc

parents 7dc99afc a354b1cc
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() {