Move static-crops to 0,0 in animations
Otherwise, its trying to apply screen-space crops to
non screen-space surfaces which causes pieces to be missing.
Bug: 157594638
Test: In split, open and close apps in the secondary and observe
launcher not being cropped.
Change-Id: Ia6f799c7f9ae7c824644a08e8dfd8da036b1a3eb
diff --git a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java
index e718598..8fd97a6 100644
--- a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java
+++ b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java
@@ -610,8 +610,10 @@
}
matrix.setTranslate(tmpPos.x, tmpPos.y);
+ final Rect crop = new Rect(target.screenSpaceBounds);
+ crop.offsetTo(0, 0);
builder.withMatrix(matrix)
- .withWindowCrop(target.screenSpaceBounds)
+ .withWindowCrop(crop)
.withAlpha(1f);
}
params[i] = builder.build();
@@ -774,8 +776,10 @@
builder.withMatrix(matrix)
.withAlpha(1f);
}
+ final Rect crop = new Rect(target.screenSpaceBounds);
+ crop.offsetTo(0, 0);
params[i] = builder
- .withWindowCrop(target.screenSpaceBounds)
+ .withWindowCrop(crop)
.build();
}
surfaceApplier.scheduleApply(params);