From 00a2de432011f19e8a7f7fca03adb4eb57697d4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Ciche=C5=84ski?= Date: Sun, 23 Jul 2023 03:05:59 +0000 Subject: [PATCH] Redirect shelf height requests into keep clear area registration Looks like there's a RecentsView code that can set it to non-zero value and it will stay that way until it gets reset on rotation. Hence guarding it on the PiP size from being executed is a sure way to prevent unwanted calls to that logic while the flag is on. Previous site calling this was in QuickstepLauncher and was manually guarded from being called. Bug: 270677470 Test: atest WMShellFlickerTests Test: presubmit passes with no flakes in PiP area Change-Id: Ib73e1cbb4c90615486372085eef9a8fdba41e960 --- .../src/com/android/wm/shell/pip/phone/PipController.java | 5 +++++ 1 file changed, 5 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 65727b6145e44..51e7be0f8a244 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 @@ -939,6 +939,11 @@ public class PipController implements PipTransitionController.PipTransitionCallb * Sets both shelf visibility and its height. */ private void setShelfHeight(boolean visible, int height) { + if (mEnablePipKeepClearAlgorithm) { + // turn this into Launcher keep clear area registration instead + setLauncherKeepClearAreaHeight(visible, height); + return; + } if (!mIsKeyguardShowingOrAnimating) { setShelfHeightLocked(visible, height); }