From c407f1aa5aa0db23a2eb8d040de7f2bcefa27138 Mon Sep 17 00:00:00 2001 From: Jordan Silva Date: Fri, 4 Oct 2024 07:55:25 +0000 Subject: [PATCH] Fix a bug where the running task would be drawn below recents task When the live tile is the adjacent app to be launched, it will wrongly update the pivot and translate all the tasks to the side, resulting in a broken animation. This bug was introduced in ag/29639296, while fixing the launch of the the adjacent task while the live tile was in the center of the screen. To solve this excessive translation, we need to update pivot only when adjacent task is not a live tile. Bug: 361744056 Change-Id: I56cbabcc351b0becd791b58dd94f65cd0b533bc2 Test: Launch central/side large tile with different live tile combinations Flag: com.android.launcher3.enable_large_desktop_windowing_tile --- .../android/quickstep/views/RecentsView.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 8b3ef04f8e..01930b3cbd 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -5418,6 +5418,7 @@ public abstract class RecentsView< int taskIndex = indexOfChild(taskView); int centerTaskIndex = getCurrentPage(); + boolean isRunningTask = taskView.isRunningTask(); float toScale = getMaxScaleForFullScreen(); boolean showAsGrid = showAsGrid(); @@ -5436,13 +5437,16 @@ public abstract class RecentsView< mTempPointF); setPivotX(mTempPointF.x); setPivotY(mTempPointF.y); - runActionOnRemoteHandles( - remoteTargetHandle -> { - remoteTargetHandle.getTaskViewSimulator().setPivotOverride( - mTempPointF); - remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents( - false); - }); + + if (!isRunningTask) { + runActionOnRemoteHandles( + remoteTargetHandle -> { + remoteTargetHandle.getTaskViewSimulator().setPivotOverride( + mTempPointF); + remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents( + false); + }); + } } }); } else if (!showAsGrid) {