Merge "Completely remove pinned task when starting a new PiP" into tm-dev am: bfbf74aec1

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18175783

Change-Id: Ia99a7f80a8712cf756fe9407b36fa5583c6c5ea4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hongwei Wang
2022-05-11 02:27:30 +00:00
committed by Automerger Merge Worker

View File

@@ -1999,7 +1999,10 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
final Task rootPinnedTask = taskDisplayArea.getRootPinnedTask(); final Task rootPinnedTask = taskDisplayArea.getRootPinnedTask();
if (rootPinnedTask != null) { if (rootPinnedTask != null) {
transitionController.collect(rootPinnedTask); transitionController.collect(rootPinnedTask);
rootPinnedTask.dismissPip(); // The new ActivityRecord should replace the existing PiP, so it's more desirable
// that the old PiP disappears instead of turning to full-screen at the same time,
// as the Task#dismissPip is trying to do.
removeRootTasksInWindowingModes(WINDOWING_MODE_PINNED);
} }
// Set a transition to ensure that we don't immediately try and update the visibility // Set a transition to ensure that we don't immediately try and update the visibility