Merge "Don't animate black background on cold launch from launcher" into oc-dr1-dev am: cff260adfc
am: 4397f03378
Change-Id: I48560bd983b105d2b37e813d1c3f9fd8bebf006d
diff --git a/services/core/java/com/android/server/wm/SurfaceControlWithBackground.java b/services/core/java/com/android/server/wm/SurfaceControlWithBackground.java
index 85ea3c0..9eb2b46 100644
--- a/services/core/java/com/android/server/wm/SurfaceControlWithBackground.java
+++ b/services/core/java/com/android/server/wm/SurfaceControlWithBackground.java
@@ -170,6 +170,11 @@
// Track overall progress of animation by computing cropped portion of status bar.
final Rect contentInsets = mWindowSurfaceController.mAnimator.mWin.mContentInsets;
float d = contentInsets.top == 0 ? 0 : (float) crop.top / contentInsets.top;
+ if (d > 1.f) {
+ // We're running expand animation from launcher, won't compute custom bg crop here.
+ mTmpContainerRect.set(crop);
+ return;
+ }
// Compute additional offset for the background when app window is positioned not at (0,0).
// E.g. landscape with navigation bar on the left.