From 7b0380764c1ffe3cbf41b2c5e918ac8ed2c31a53 Mon Sep 17 00:00:00 2001 From: Riddle Hsu Date: Thu, 23 Jun 2022 18:38:02 +0800 Subject: [PATCH] Do not use seamless rotation for multi-window Otherwise other non seamless apps may be flickering. Also it potential causes sync problem when split-screen uses sync group and seamless rotation uses applyWithNextDraw at the same time. Note that shell transition doesn't have the problem in split screen because it will reject seamless if there is one changed task doesn't declare seamless. So at least the split root task will guard the case. Bug: 236926512 Test: Enter split-screen with an app using ROTATION_ANIMATION_SEAMLESS. Rotate the display and there will be a normal rotation animation. Change-Id: I6a44c1d3530cb92bdf6ebd81f1a520158b552d00 --- services/core/java/com/android/server/wm/DisplayRotation.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/DisplayRotation.java b/services/core/java/com/android/server/wm/DisplayRotation.java index d2c71f57e701d..b9d83198139dc 100644 --- a/services/core/java/com/android/server/wm/DisplayRotation.java +++ b/services/core/java/com/android/server/wm/DisplayRotation.java @@ -620,7 +620,8 @@ public class DisplayRotation { // We only enable seamless rotation if the top window has requested it and is in the // fullscreen opaque state. Seamless rotation requires freezing various Surface states and // won't work well with animations, so we disable it in the animation case for now. - if (w.getAttrs().rotationAnimation != ROTATION_ANIMATION_SEAMLESS || w.isAnimatingLw()) { + if (w.getAttrs().rotationAnimation != ROTATION_ANIMATION_SEAMLESS || w.inMultiWindowMode() + || w.isAnimatingLw()) { return false; }