diff options
-rw-r--r-- | services/java/com/android/server/ScreenRotationAnimation.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/java/com/android/server/ScreenRotationAnimation.java b/services/java/com/android/server/ScreenRotationAnimation.java index 1cc6a2a..4290b89 100644 --- a/services/java/com/android/server/ScreenRotationAnimation.java +++ b/services/java/com/android/server/ScreenRotationAnimation.java @@ -68,8 +68,9 @@ class ScreenRotationAnimation { Bitmap screenshot = Surface.screenshot(0, 0); if (screenshot != null) { - // Screenshot does NOT include rotation! - mSnapshotRotation = 0; + // Screenshot does NOT include rotation but we need to consider ro.sf.hwrotation! + mSnapshotRotation = ( + (4 - android.os.SystemProperties.getInt("ro.sf.hwrotation",0) / 90) % 4); mWidth = screenshot.getWidth(); mHeight = screenshot.getHeight(); } else { |