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
This commit is contained in:
Evan Rosky
2020-05-29 14:52:27 -07:00
parent f71079343a
commit 4510d13ff3

View File

@@ -610,8 +610,10 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
}
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 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
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);