Merge "Revert "Revert "Crop windowing layer to that of display size in screen rotation animation""" into tm-qpr-dev am: 8426faea4f

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

Change-Id: Ic07dd19997c9fbd0325acf1b667b847b45f1f047
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-07-19 21:53:50 +00:00
committed by Automerger Merge Worker

View File

@@ -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() {