From 4510d13ff34641b8b60b52ee171b5d3891796b93 Mon Sep 17 00:00:00 2001 From: Evan Rosky Date: Fri, 29 May 2020 14:52:27 -0700 Subject: [PATCH] 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 --- .../launcher3/QuickstepAppTransitionManagerImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java index e718598872..8fd97a66d3 100644 --- a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java +++ b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java @@ -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);