From d9febb56d726c44a1df753ede021d0995d21dc44 Mon Sep 17 00:00:00 2001 From: Riddle Hsu Date: Wed, 28 Jul 2021 22:01:39 +0800 Subject: [PATCH] Wait for notification shade to redraw on orientation change It was skipped to reduce rotation latency. But it may look flashing if the top app is redrawn much faster than the notification shade or the background colors are not similar. Bug: 194610242 Test: Expand notification shade and rotate device while the foreground app can handle orientation change quickly. Change-Id: I1a4870d9f237bad9088159f5979048b4cdcbf287 --- .../android/server/wm/FadeRotationAnimationController.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/wm/FadeRotationAnimationController.java b/services/core/java/com/android/server/wm/FadeRotationAnimationController.java index 53b6b41db2bac..eab3f108d17a9 100644 --- a/services/core/java/com/android/server/wm/FadeRotationAnimationController.java +++ b/services/core/java/com/android/server/wm/FadeRotationAnimationController.java @@ -66,10 +66,8 @@ public class FadeRotationAnimationController extends FadeAnimationController { } else { mNavBarToken = null; } - // Do not fade notification shade when running fixed rotation (not frozen) because it may - // need to animate with the launching app. - final WindowState notificationShade = mFrozenTimeoutRunnable == null - ? displayPolicy.getNotificationShade() : null; + // Collect the target windows to fade out. The display won't wait for them to unfreeze. + final WindowState notificationShade = displayPolicy.getNotificationShade(); displayContent.forAllWindows(w -> { if (w.mActivityRecord == null && w.mHasSurface && !w.mForceSeamlesslyRotate && !w.mIsWallpaper && !w.mIsImWindow && w != navigationBar