summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Beverly Tai <beverlyt@google.com> 2024-05-23 14:33:28 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-05-23 14:33:28 +0000
commita354b1cc647f7f6183cd37fb0debc84eac07eab7 (patch)
tree6a366dc5e350bf149eaef7ef1a8348934d50e72a
parent54b52015a9815da70a559fccaf9f32b53ae9d408 (diff)
parentb165ede86c502671edbc99bd6f8dea2552e34f97 (diff)
Merge "Remove scrim animation between AOD and OFF" into 24D1-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java20
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