summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 7a73759f0388..ca2610af3f66 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -6831,7 +6831,8 @@ public class WindowManagerService extends IWindowManager.Stub
final WindowList windows = displayContent.getWindowList();
final int oldRotation = mRotation;
- boolean rotateSeamlessly = mPolicy.shouldRotateSeamlessly(oldRotation, mRotation);
+ int rotation = mPolicy.rotationForOrientationLw(mLastOrientation, mRotation);
+ boolean rotateSeamlessly = mPolicy.shouldRotateSeamlessly(oldRotation, rotation);
if (rotateSeamlessly) {
for (int i = windows.size() - 1; i >= 0; i--) {
@@ -6864,7 +6865,6 @@ public class WindowManagerService extends IWindowManager.Stub
// an orientation that has different metrics than it expected.
// eg. Portrait instead of Landscape.
- int rotation = mPolicy.rotationForOrientationLw(mLastOrientation, mRotation);
boolean altOrientation = !mPolicy.rotationHasCompatibleMetricsLw(
mLastOrientation, rotation);