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

Commit dbc96048 authored by Vinit Nayak's avatar Vinit Nayak Committed by Android (Google) Code Review
Browse files

Merge "Crop windowing layer to that of display size in screen rotation animation" into tm-qpr-dev

parents 8b94eba3 2ebf2466
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -600,7 +600,7 @@ class ScreenRotationAnimation {
        }

        private SurfaceAnimator startDisplayRotation() {
            return startAnimation(initializeBuilder()
            SurfaceAnimator animator = startAnimation(initializeBuilder()
                            .setAnimationLeashParent(mDisplayContent.getSurfaceControl())
                            .setSurfaceControl(mDisplayContent.getWindowingLayer())
                            .setParentSurfaceControl(mDisplayContent.getSurfaceControl())
@@ -609,6 +609,13 @@ class ScreenRotationAnimation {
                            .build(),
                    createWindowAnimationSpec(mRotateEnterAnimation),
                    this::onAnimationEnd);

            // Crop the animation leash to avoid extended wallpaper from showing over
            // mBackColorSurface
            Rect displayBounds = mDisplayContent.getBounds();
            mDisplayContent.getPendingTransaction()
                    .setWindowCrop(animator.mLeash, displayBounds.width(), displayBounds.height());
            return animator;
        }

        private SurfaceAnimator startScreenshotAlphaAnimation() {