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

Commit 5e2265a6 authored by Ikram Gabiyev's avatar Ikram Gabiyev
Browse files

Mixed transitions can enter PiP if scheduled only

Having a change with a windowing mode = pinned isn't
enough in a mixed transition to deem its part to be
animating enter-pip.

More specifically, if a mixed transition wants to check
whether to animate enter-pip, it needs to check whether
PipTransition sent a hierarchy-op to Core to actually move
a PiP activity into a pinned task. This happens if and only if
PipTransitionState#getState() has entered SCHEDULED_ENTER_PIP.

Bug: 432014880
Flag: EXEMPT bugfix
Test: manually repro the steps in the BR
Change-Id: I7268aa76880741db0d8d930bfacf5e20204850bb
parent 7654565a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -435,7 +435,8 @@ public class PipTransition extends PipTransitionController implements
    @Override
    public boolean isEnteringPip(@NonNull TransitionInfo.Change change,
            @WindowManager.TransitionType int transitType) {
        if (change.getTaskInfo() != null
        if (mPipTransitionState.getState() == PipTransitionState.SCHEDULED_ENTER_PIP
                && change.getTaskInfo() != null
                && change.getTaskInfo().getWindowingMode() == WINDOWING_MODE_PINNED) {
            // TRANSIT_TO_FRONT, though uncommon with triggering PiP, should semantically also
            // be allowed to animate if the task in question is pinned already - see b/308054074.