From 76ab1b4df330cc9eda53ff1466f03d68abd648f9 Mon Sep 17 00:00:00 2001 From: Hongwei Wang Date: Fri, 6 Jan 2023 13:26:18 -0800 Subject: [PATCH] Fix the flicker when entering PiP from Recents Noticed onKeyguardVisibilityChanged(visible=false, occluded=false, animatingDismiss=false) callback when entering PiP from Recents, which causes the PiP window to be visible while it has not settled in final bounds. Bug: 264497272 Test: repeatedly enter PiP from Recents Test: Ensure PiP window is visible upon device unlock Change-Id: I807a8f081001997a25aa37ab0a7d1a19ac6397ff --- .../Shell/src/com/android/wm/shell/pip/phone/PipController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 efe938f0a2746..c7ac3a0f8cf4b 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 @@ -817,7 +817,7 @@ public class PipController implements PipTransitionController.PipTransitionCallb @Override public void onKeyguardVisibilityChanged(boolean visible, boolean occluded, boolean animatingDismiss) { - if (!mPipTaskOrganizer.isInPip()) { + if (!mPipTransitionState.hasEnteredPip()) { return; } if (visible) {