From 6c3d9ca37fe223f90dea9d5eb6c1e437d0cc8760 Mon Sep 17 00:00:00 2001 From: Evan Rosky Date: Wed, 3 May 2023 13:28:38 -0700 Subject: [PATCH] Use isSplitActive vs visible when detecting mixed pip/split split was changed to preserve splits in "background", so it needs to be detected via isSplitActive instead of isSplitVisible so that it can update properly when a PiP transition comes in. Bug: 280253323 Test: wait for b/280523948, then open split with an auto-pip and then swipe-to-home. Try this with both single and multi-activity pip and dump window containers to verify correct hierarchy. Change-Id: Id3f28cad593a799933ddc24a570b7a91e22bd275 --- .../com/android/wm/shell/transition/DefaultMixedHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java index 49429327572e2..0aeec32ccd7cc 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java @@ -150,9 +150,9 @@ public class DefaultMixedHandler implements Transitions.TransitionHandler, @Override public WindowContainerTransaction handleRequest(@NonNull IBinder transition, @NonNull TransitionRequestInfo request) { - if (mPipHandler.requestHasPipEnter(request) && mSplitHandler.isSplitScreenVisible()) { + if (mPipHandler.requestHasPipEnter(request) && mSplitHandler.isSplitActive()) { ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, " Got a PiP-enter request while " - + "Split-Screen is foreground, so treat it as Mixed."); + + "Split-Screen is active, so treat it as Mixed."); if (request.getRemoteTransition() != null) { throw new IllegalStateException("Unexpected remote transition in" + "pip-enter-from-split request");