From 828ec3dc518bfeff9cb9205e40652419e9c59443 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Mon, 22 Aug 2016 13:32:34 -0700 Subject: [PATCH] Only allow focused window to select seamless rotation. We require apps to opt in to seamless rotation. If a dialog or some such has popped up above them, the dialog may not be prepared to rotate seamlessly and we should just fall back to the old behavior for now. Bug: 30968345 Change-Id: Ib9a7352ed84d41076bdd162bf38d151b053a307e --- .../java/com/android/server/policy/PhoneWindowManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 8da3a7d7639dc..a39add80ba8fc 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -7756,6 +7756,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { } final WindowState w = mTopFullscreenOpaqueWindowState; + if (w != mFocusedWindow) { + return false; + } // We only enable seamless rotation if the top window has requested // it and is in the fullscreen opaque state. Seamless rotation