From 7e51edd808490af360478f4e6cc3958e0a960f37 Mon Sep 17 00:00:00 2001 From: Jerry Chang Date: Wed, 29 Mar 2023 03:45:44 +0000 Subject: [PATCH] Fix wrong surface positioning when animating a split pair to home Use the screen based position instead of parent-relative position to make sure the surface was placing at the expected position while animation apps to home. Bug: 273685456 Test: http://recall/-/fLARJNt42LVxc3tt86SneW/c2pLS6FwyEMweiLiWqqzPa Change-Id: Iea79e6d2b9ab591fe18c5ac7a0d89bb90a461145 --- .../com/android/launcher3/QuickstepTransitionManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index 8baa324a2a..8796d6c932 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -1472,13 +1472,13 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener RemoteAnimationTarget target = appTargets[i]; SurfaceProperties builder = transaction.forSurface(target.leash); - if (target.localBounds != null) { - tmpPos.set(target.localBounds.left, target.localBounds.top); + if (target.screenSpaceBounds != null) { + tmpPos.set(target.screenSpaceBounds.left, target.screenSpaceBounds.top); } else { tmpPos.set(target.position.x, target.position.y); } - final Rect crop = new Rect(target.screenSpaceBounds); + final Rect crop = new Rect(target.localBounds); crop.offsetTo(0, 0); if (target.mode == MODE_CLOSING) { tmpRect.set(target.screenSpaceBounds);