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

Commit 1dd5670a authored by Mateusz Cicheński's avatar Mateusz Cicheński Committed by Automerger Merge Worker
Browse files

Merge "Make PiP round corners when entering from split screen." into tm-dev...

Merge "Make PiP round corners when entering from split screen." into tm-dev am: 0b6bf0f2 am: 8a876b25

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17627555



Change-Id: I769c4305ce21fe0b73927bb168744c1339b1fc39
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 2bdaabe3 8a876b25
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -665,6 +665,15 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
                mSurfaceControlTransactionFactory.getTransaction();
        tx.setAlpha(mLeash, 0f);
        tx.apply();

        // When entering PiP this transaction will be applied within WindowContainerTransaction and
        // ensure that the PiP has rounded corners.
        final SurfaceControl.Transaction boundsChangeTx =
                mSurfaceControlTransactionFactory.getTransaction();
        mSurfaceTransactionHelper
                .crop(boundsChangeTx, mLeash, destinationBounds)
                .round(boundsChangeTx, mLeash, true /* applyCornerRadius */);

        mPipTransitionState.setTransitionState(PipTransitionState.ENTRY_SCHEDULED);
        applyEnterPipSyncTransaction(destinationBounds, () -> {
            mPipAnimationController
@@ -677,7 +686,7 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
            // mState is set right after the animation is kicked off to block any resize
            // requests such as offsetPip that may have been called prior to the transition.
            mPipTransitionState.setTransitionState(PipTransitionState.ENTERING_PIP);
        }, null /* boundsChangeTransaction */);
        }, boundsChangeTx);
    }

    private void onEndOfSwipePipToHomeTransition() {