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
(cherry picked from commit 828ec3dc51)
This commit is contained in:
Robert Carr
2016-08-22 13:32:34 -07:00
committed by Rob Carr
parent ef8d8ea24a
commit 066d94f6df

View File

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