summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hongwei Wang <hwwang@google.com> 2022-05-11 02:34:40 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-05-11 02:34:40 +0000
commit1d266ad5bf89f23b20b51b6f7f7507d0712d2d70 (patch)
tree1efcbab1a4c6308c3f187e7ca37b0df00632be67
parent156d95f269642ae18766646c4080ec2ce23cc0c8 (diff)
parentbfbf74aec15ab608861a8fe428c6c0087e216669 (diff)
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: Ic431640b3cae305ebff2554a0c1beef05ca6ced2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--services/core/java/com/android/server/wm/RootWindowContainer.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index c0dff14e5de5..0aab18604528 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -1999,7 +1999,10 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
final Task rootPinnedTask = taskDisplayArea.getRootPinnedTask();
if (rootPinnedTask != null) {
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