From 619af0b8ce5d71ec9729590e0bc7c6b86758581f Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Tue, 29 Jun 2021 11:20:18 -0700 Subject: [PATCH] WM: Mark screen rotation layer as opaque When rotating the device, if the screenshot of the display is not opaque, the user might see other layers appear through the screenshot. This will look like ghost images. We fix this by marking the layer as opaque. Test: rotate homescreen with The Mandalorian wallpaper Fixes: 191128850 Change-Id: I5b1e7bb2ff028bfe5f6dd31929ddf58f0f7a1a78 --- .../core/java/com/android/server/wm/ScreenRotationAnimation.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java index 9d8b8f76ad402..58363f2316ea4 100644 --- a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java +++ b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java @@ -212,6 +212,7 @@ class ScreenRotationAnimation { String name = "RotationLayer"; mScreenshotLayer = displayContent.makeOverlay() .setName(name) + .setOpaque(true) .setSecure(isSecure) .setCallsite("ScreenRotationAnimation") .setBLASTLayer()