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
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 8b3ef04..01930b3 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -5418,6 +5418,7 @@
 
         int taskIndex = indexOfChild(taskView);
         int centerTaskIndex = getCurrentPage();
+        boolean isRunningTask = taskView.isRunningTask();
 
         float toScale = getMaxScaleForFullScreen();
         boolean showAsGrid = showAsGrid();
@@ -5436,13 +5437,16 @@
                             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) {