From 6a113515eca600f478c562b857da54a560333c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Ciche=C5=84ski?= Date: Fri, 7 Oct 2022 19:15:33 +0000 Subject: [PATCH] Don't move stashed PiP in response to keep clear areas changes. Test: manually, enter pip, stash it, open an app -> pip doesn't move Bug: 183746978 Change-Id: Iaffb4e1683fe3fb1238fa3a7ae12f04055e40704 --- .../src/com/android/wm/shell/pip/phone/PipController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java index a918559d897e6..30124a5363a45 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java @@ -161,6 +161,10 @@ public class PipController implements PipTransitionController.PipTransitionCallb // early bail out if the keep clear areas feature is disabled return; } + if (mPipBoundsState.isStashed()) { + // don't move when stashed + return; + } // if there is another animation ongoing, wait for it to finish and try again if (mPipAnimationController.isAnimating()) { mMainExecutor.removeCallbacks(