From 9a3b1ce673ee3f31a66a745b4c46378cc5e7977f Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Thu, 2 May 2024 15:41:35 -0700 Subject: [PATCH] Determine split leash position by taskId instead of bounds * Previously we were comparing bounds of the leash to determine which leash was leftTop vs bottomRight * That didn't work when we were translating the split apps when IME is showing in portrait split screen * Transitions between IME showing to recents animation could probably use some work, but that itself is not a regression. Bug: 330714602 Test: Tested on large and small screen with IME up on both apps No more empty hole Change-Id: Ie08ac644e5d1bcc48ba57e05e25bbee66afa3d37 --- quickstep/src/com/android/quickstep/util/TaskViewSimulator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java index 1152de2750..273b944bfc 100644 --- a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java +++ b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java @@ -244,7 +244,7 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy { if (mSplitBounds == null) { mStagePosition = STAGE_POSITION_UNDEFINED; } else { - mStagePosition = mThumbnailPosition.equals(splitInfo.leftTopBounds) + mStagePosition = runningTarget.taskId == splitInfo.leftTopTaskId ? STAGE_POSITION_TOP_OR_LEFT : STAGE_POSITION_BOTTOM_OR_RIGHT; mPositionHelper.setSplitBounds(convertLauncherSplitBoundsToShell(mSplitBounds), mStagePosition);