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

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

Merge "[PiP2] Only save reentry state on expand" into main

parents 751ec0c0 26fbcb00
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -627,6 +627,12 @@ public class PipTransition extends PipTransitionController implements
            finishTransition();
        });
        cacheAndStartTransitionAnimator(animator);

        // Save the PiP bounds in case, we re-enter the PiP with the same component.
        float snapFraction = mPipBoundsAlgorithm.getSnapFraction(
                mPipBoundsState.getBounds());
        mPipBoundsState.saveReentryState(snapFraction);

        return true;
    }

@@ -912,11 +918,6 @@ public class PipTransition extends PipTransitionController implements
                        "Unexpected bundle for " + mPipTransitionState);
                break;
            case PipTransitionState.EXITED_PIP:
                // Save the PiP bounds in case, we re-enter the PiP with the same component.
                float snapFraction = mPipBoundsAlgorithm.getSnapFraction(
                        mPipBoundsState.getBounds());
                mPipBoundsState.saveReentryState(snapFraction);

                mPipTransitionState.setPinnedTaskLeash(null);
                mPipTransitionState.setPipTaskInfo(null);
                break;