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

Commit 859c6c2c authored by Ikram Gabiyev's avatar Ikram Gabiyev Committed by Android (Google) Code Review
Browse files

Merge "Allow intermittent EXITING in PiP states" into main

parents fd41b4d2 5a3cb52f
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -481,8 +481,6 @@ public class PipTransitionState {
                // - there is no drag-to-desktop gesture in progress; otherwise the PiP resize
                //   transition will block the drag-to-desktop transitions from finishing
                return isPipStateIdle() && !mPipDesktopState.isDragToDesktopInProgress();
            case CHANGING_PIP_BOUNDS:
                return mState == SCHEDULED_BOUNDS_CHANGE;
            default:
                return true;
        }
+2 −0
Original line number Diff line number Diff line
@@ -169,6 +169,7 @@ public class PipExpandHandler implements Transitions.TransitionHandler {
                return false;
            }
        }
        mPipTransitionState.setState(PipTransitionState.EXITING_PIP);
        mFinishCallback = finishCallback;

        // The parent change if we were in a multi-activity PiP; null if single activity PiP.
@@ -316,6 +317,7 @@ public class PipExpandHandler implements Transitions.TransitionHandler {
        if (pipChange == null || pipChange.getLeash() == null) {
            return false;
        }
        mPipTransitionState.setState(PipTransitionState.EXITING_PIP);
        mFinishCallback = finishCallback;

        // Get the original parent before PiP. If original task hosting the PiP activity was
+0 −8
Original line number Diff line number Diff line
@@ -184,14 +184,6 @@ public class PipTransitionStateTest extends ShellTestCase {
                PipTransitionState.CHANGING_PIP_BOUNDS));
    }

    @Test
    public void testShouldTransitionToState_changingPipBounds_withoutScheduling_returnsFalse() {
        mPipTransitionState.setState(PipTransitionState.ENTERED_PIP);

        Assert.assertFalse(mPipTransitionState.shouldTransitionToState(
                PipTransitionState.CHANGING_PIP_BOUNDS));
    }

    @Test
    public void shouldTransitionToState_scheduledBoundsChangeWhileChangingBounds_returnsFalse() {
        Bundle extra = new Bundle();