Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c3d9ca3 authored by Evan Rosky's avatar Evan Rosky
Browse files

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
parent 1a1cc48d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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");