From 926643f48c9060ef340e05f8a096026ec872c54b Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Wed, 2 Aug 2017 12:01:12 -0700 Subject: [PATCH] Avoid entering orientation changing state when seamlessly rotating. It used to be that we only used mOrientationChanging instead of the configuration mismatch detection. We would explicitly avoid setting mOrientationChanging in the case of seamless rotation. We need to continue to return false here for seamless rotation as getOrientationChanging is only used to track the screen freezing logic which we don't want here. It can also trigger windows to be re-shown, causing animations and glitches which are presumably normally covered up by the screenshot. Bug: 63852205 Test: Manual, go/wm-smoke Change-Id: I537fa815180bbccc3b9682a15496d3ef851df6ee --- services/core/java/com/android/server/wm/WindowState.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 34ff9e8e338fa..9474c93fe872d 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -1219,8 +1219,9 @@ class WindowState extends WindowContainer implements WindowManagerP // TODO(b/62846907): Checking against {@link mLastReportedConfiguration} could be flaky as // this is not necessarily what the client has processed yet. Find a // better indicator consistent with the client. - return mOrientationChanging || (isVisible() - && getConfiguration().orientation != mLastReportedConfiguration.orientation); + return (mOrientationChanging || (isVisible() + && getConfiguration().orientation != mLastReportedConfiguration.orientation)) + && !mSeamlesslyRotated; } void setOrientationChanging(boolean changing) {