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

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

Merge "Fix enter pip animation in fixed rotation with KCA flag on" into...

Merge "Fix enter pip animation in fixed rotation with KCA flag on" into tm-qpr-dev am: 6a2a8f53 am: db11b1ce am: bb4f84d5

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



Change-Id: I22aa93f8fff2d9b6b97f6a2eb54f69d3496bd00c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 68308092 bb4f84d5
Loading
Loading
Loading
Loading
+12 −15
Original line number Original line Diff line number Diff line
@@ -1176,20 +1176,7 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,


        final Rect newDestinationBounds = mPipBoundsAlgorithm.getEntryDestinationBounds();
        final Rect newDestinationBounds = mPipBoundsAlgorithm.getEntryDestinationBounds();
        if (newDestinationBounds.equals(currentDestinationBounds)) return;
        if (newDestinationBounds.equals(currentDestinationBounds)) return;
        if (animator.getAnimationType() == ANIM_TYPE_BOUNDS) {
        updateAnimatorBounds(newDestinationBounds);
            if (mWaitForFixedRotation) {
                // The new destination bounds are in next rotation (DisplayLayout has been rotated
                // in computeRotatedBounds). The animation runs in previous rotation so the end
                // bounds need to be transformed.
                final Rect displayBounds = mPipBoundsState.getDisplayBounds();
                final Rect rotatedEndBounds = new Rect(newDestinationBounds);
                rotateBounds(rotatedEndBounds, displayBounds, mNextRotation, mCurrentRotation);
                animator.updateEndValue(rotatedEndBounds);
            } else {
                animator.updateEndValue(newDestinationBounds);
            }
        }
        animator.setDestinationBounds(newDestinationBounds);
        destinationBoundsOut.set(newDestinationBounds);
        destinationBoundsOut.set(newDestinationBounds);
    }
    }


@@ -1201,8 +1188,18 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
                mPipAnimationController.getCurrentAnimator();
                mPipAnimationController.getCurrentAnimator();
        if (animator != null && animator.isRunning()) {
        if (animator != null && animator.isRunning()) {
            if (animator.getAnimationType() == ANIM_TYPE_BOUNDS) {
            if (animator.getAnimationType() == ANIM_TYPE_BOUNDS) {
                if (mWaitForFixedRotation) {
                    // The new destination bounds are in next rotation (DisplayLayout has been
                    // rotated in computeRotatedBounds). The animation runs in previous rotation so
                    // the end bounds need to be transformed.
                    final Rect displayBounds = mPipBoundsState.getDisplayBounds();
                    final Rect rotatedEndBounds = new Rect(bounds);
                    rotateBounds(rotatedEndBounds, displayBounds, mNextRotation, mCurrentRotation);
                    animator.updateEndValue(rotatedEndBounds);
                } else {
                    animator.updateEndValue(bounds);
                    animator.updateEndValue(bounds);
                }
                }
            }
            animator.setDestinationBounds(bounds);
            animator.setDestinationBounds(bounds);
        }
        }
    }
    }