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
This commit is contained in:
Mateusz Cicheński
2023-07-23 03:05:59 +00:00
parent 6ff0eddd66
commit 00a2de4320

View File

@@ -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);
}