diff options
| -rw-r--r-- | services/core/java/com/android/server/wm/RootWindowContainer.java | 5 |
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 |