diff options
| author | 2024-05-23 14:33:28 +0000 | |
|---|---|---|
| committer | 2024-05-23 14:33:28 +0000 | |
| commit | a354b1cc647f7f6183cd37fb0debc84eac07eab7 (patch) | |
| tree | 6a366dc5e350bf149eaef7ef1a8348934d50e72a | |
| parent | 54b52015a9815da70a559fccaf9f32b53ae9d408 (diff) | |
| parent | b165ede86c502671edbc99bd6f8dea2552e34f97 (diff) | |
Merge "Remove scrim animation between AOD and OFF" into 24D1-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java index f2a649ba2e32..78d5ae413b4a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java @@ -46,7 +46,11 @@ public enum ScrimState { mFrontAlpha = 1f; mBehindAlpha = 1f; - mAnimationDuration = ScrimController.ANIMATION_DURATION_LONG; + if (previousState == AOD) { + mAnimateChange = false; + } else { + mAnimationDuration = ScrimController.ANIMATION_DURATION_LONG; + } } @Override @@ -193,11 +197,15 @@ 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 - // set our state. - mAnimateChange = mDozeParameters.shouldControlScreenOff() - && !mDozeParameters.shouldShowLightRevealScrim(); + 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 |