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

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

Merge "Do not remove surface when resetting previous PiP" into udc-qpr-dev am:...

Merge "Do not remove surface when resetting previous PiP" into udc-qpr-dev am: 2307caae am: e018eb4e

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



Change-Id: I94b74854cd48f62594536aadb2d26ad10575b456
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 207b4c09 e018eb4e
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -1059,7 +1059,21 @@ public class PipTransition extends PipTransitionController {
    private void resetPrevPip(@NonNull TransitionInfo.Change prevPipTaskChange,
            @NonNull SurfaceControl.Transaction startTransaction) {
        final SurfaceControl leash = prevPipTaskChange.getLeash();
        startTransaction.remove(leash);
        final Rect bounds = prevPipTaskChange.getEndAbsBounds();
        final Point offset = prevPipTaskChange.getEndRelOffset();
        bounds.offset(-offset.x, -offset.y);

        startTransaction.setWindowCrop(leash, null);
        startTransaction.setMatrix(leash, 1, 0, 0, 1);
        startTransaction.setCornerRadius(leash, 0);
        startTransaction.setPosition(leash, bounds.left, bounds.top);

        if (mHasFadeOut && prevPipTaskChange.getTaskInfo().isVisible()) {
            if (mPipAnimationController.getCurrentAnimator() != null) {
                mPipAnimationController.getCurrentAnimator().cancel();
            }
            startTransaction.setAlpha(leash, 1);
        }

        mHasFadeOut = false;
        mCurrentPipTaskToken = null;