Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6b78746 authored by Hongwei Wang's avatar Hongwei Wang Committed by Android (Google) Code Review
Browse files

Merge "Do not merge PiP removal into Recents" into main

parents 303f6160 d4bb429e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@ import android.util.ArrayMap;
import android.util.IntArray;
import android.util.Pair;
import android.util.Slog;
import android.view.Display;
import android.view.RemoteAnimationTarget;
import android.view.SurfaceControl;
import android.window.PictureInPictureSurfaceTransaction;
@@ -910,6 +909,14 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler,
                            "task #" + taskInfo.taskId + " is always_on_top");
                    return;
                }
                if (TransitionUtil.isClosingType(change.getMode())
                        && taskInfo != null && taskInfo.lastParentTaskIdBeforePip > 0) {
                    // Pinned task is closing as a side effect of the removal of its original Task,
                    // such transition should be handled by PiP. So cancel the merge here.
                    cancel(false /* toHome */, false /* withScreenshots */,
                            "task #" + taskInfo.taskId + " is removed with its original parent");
                    return;
                }
                final boolean isRootTask = taskInfo != null
                        && TransitionInfo.isIndependent(change, info);
                final boolean isRecentsTask = mRecentsTask != null