diff --git a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java index d09068b02fd49..f80e732c8212a 100644 --- a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java +++ b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java @@ -600,7 +600,7 @@ class ScreenRotationAnimation { } private SurfaceAnimator startDisplayRotation() { - SurfaceAnimator animator = startAnimation(initializeBuilder() + return startAnimation(initializeBuilder() .setAnimationLeashParent(mDisplayContent.getSurfaceControl()) .setSurfaceControl(mDisplayContent.getWindowingLayer()) .setParentSurfaceControl(mDisplayContent.getSurfaceControl()) @@ -609,13 +609,6 @@ 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() {