Revert "Revert "Crop windowing layer to that of display size in screen rotation animation""

This reverts commit e9159b4521.

Reason for revert: Unrelated to original revert reason

Change-Id: Iea7121498d567bdf4da5609a1c98b30063ab15d9
This commit is contained in:
Vinit Nayak
2022-07-19 00:03:11 +00:00
parent e9159b4521
commit db7097e5c5

View File

@@ -600,7 +600,7 @@ class ScreenRotationAnimation {
} }
private SurfaceAnimator startDisplayRotation() { private SurfaceAnimator startDisplayRotation() {
return startAnimation(initializeBuilder() SurfaceAnimator animator = startAnimation(initializeBuilder()
.setAnimationLeashParent(mDisplayContent.getSurfaceControl()) .setAnimationLeashParent(mDisplayContent.getSurfaceControl())
.setSurfaceControl(mDisplayContent.getWindowingLayer()) .setSurfaceControl(mDisplayContent.getWindowingLayer())
.setParentSurfaceControl(mDisplayContent.getSurfaceControl()) .setParentSurfaceControl(mDisplayContent.getSurfaceControl())
@@ -609,6 +609,13 @@ class ScreenRotationAnimation {
.build(), .build(),
createWindowAnimationSpec(mRotateEnterAnimation), createWindowAnimationSpec(mRotateEnterAnimation),
this::onAnimationEnd); 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() { private SurfaceAnimator startScreenshotAlphaAnimation() {