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

Commit a354b1cc authored by Beverly Tai's avatar Beverly Tai Committed by Android (Google) Code Review
Browse files

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

parents 54b52015 b165ede8
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -46,8 +46,12 @@ public enum ScrimState {
            mFrontAlpha = 1f;
            mBehindAlpha = 1f;

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

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

            mAnimationDuration = ScrimController.ANIMATION_DURATION_LONG;
            // DisplayPowerManager may blank the screen for us, or we might blank it for ourselves
            // by animating the screen off via the LightRevelScrim. In either case we just need to
            if (previousState == OFF) {
                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.
                mAnimateChange = mDozeParameters.shouldControlScreenOff()
                        && !mDozeParameters.shouldShowLightRevealScrim();
            }
        }

        @Override
        public float getMaxLightRevealScrimAlpha() {