Merge "Remove scrim animation between AOD and OFF" into 24D1-dev
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 f2a649b..78d5ae4 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 @@
             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 @@
             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