summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Vinit Nayak <peanutbutter@google.com> 2022-07-18 15:09:00 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-07-18 15:09:00 +0000
commit4244c531ed2e8c9b175956f5009727fbf6f5b1c0 (patch)
tree7bdd773f8d118c0b4c753782aaf1e13f9e8e89fe
parent06fae323ac6bf3e0b5018bc4aa77ed999175b225 (diff)
parentdbc9604826b1d86fae02d0cea9987318896e44c1 (diff)
Merge "Crop windowing layer to that of display size in screen rotation animation" into tm-qpr-dev am: dbc9604826
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19284865 Change-Id: I04b368538a1c6ad61fcc737aacfd643b5d7683f7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--services/core/java/com/android/server/wm/ScreenRotationAnimation.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java
index f80e732c8212..d09068b02fd4 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() {
- 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() {