From 1ccd42510fe40f5ece98c54cc6fcd2b2724440ac Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Mon, 15 Aug 2016 12:05:21 -0700 Subject: [PATCH] Allow seamless rotation before mTopIsFullscreen is set. The difference between mTopFullscreenOpaqueWindowState != null and mTopIsFullscreen relates to whether the status bar is animating. However the flag won't be cleared until the next layout pass following the animation. As long as the window isn't animating we are fine to rotate seamlessly. This check was copied from selectRotationAnimationLw. A little code archaeology implies it was perhaps historical and introduced before the flag had this meaning. Bug: 30171992 Change-Id: I326bf7766f8ebe307b833d1ca0c0cdfe80b1eb6c --- .../core/java/com/android/server/policy/PhoneWindowManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 0b07902eb440b..6295630a7a8eb 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -7758,7 +7758,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { // 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 != null && mTopIsFullscreen && !w.isAnimatingLw() && + if (w != null && !w.isAnimatingLw() && ((w.getAttrs().rotationAnimation == ROTATION_ANIMATION_JUMPCUT) || (w.getAttrs().rotationAnimation == ROTATION_ANIMATION_SEAMLESS))) { return true;