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
This commit is contained in:
Riddle Hsu
2022-06-23 18:38:02 +08:00
parent d9fa425f92
commit 7b0380764c

View File

@@ -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;
}