summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkallt_kaffe <kallt_kaffe@apedroid.com>2012-01-26 13:03:52 +0100
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-01-26 12:46:14 +0000
commit7e377b4c03b99d59edb919298574ca7a7053ac66 (patch)
tree9aa1d8c5941cfd4df52c09ac8be8969e3c34a0c0
parentbf2ebd16544b1b4b4065b44568007e339f3e8f27 (diff)
downloadframeworks_base-7e377b4c03b99d59edb919298574ca7a7053ac66.zip
frameworks_base-7e377b4c03b99d59edb919298574ca7a7053ac66.tar.gz
frameworks_base-7e377b4c03b99d59edb919298574ca7a7053ac66.tar.bz2
Rotation animation, fix for devices with ro.sf.hwrotation set to something other than 0.
Tested on ZTE V9 which has ro.sf.hwrotation set to 270. See http://review.cyanogenmod.com/#change,11974 for more info about the animation and the issues experienced on rotated displays. Change-Id: Ia0d08434d6c1fd8ee6aab46c2c53950e2298436d
-rw-r--r--services/java/com/android/server/ScreenRotationAnimation.java5
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 {