summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorBrett Chabot <brettchabot@google.com>2013-05-17 17:19:02 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-05-17 17:19:02 -0700
commit98354974f9b7edf004adbdbd35ab7d617c2950bb (patch)
tree987fc9b15cd678f8e4edf5b6676e6598e722db5b /policy
parent5c6370a405581e1e4da084dac1ca0e5171ce6574 (diff)
parent6ffce75fa78fba82bde8f1df5828d177457b7a7a (diff)
downloadframeworks_base-98354974f9b7edf004adbdbd35ab7d617c2950bb.zip
frameworks_base-98354974f9b7edf004adbdbd35ab7d617c2950bb.tar.gz
frameworks_base-98354974f9b7edf004adbdbd35ab7d617c2950bb.tar.bz2
am 6ffce75f: am 154bb559: Merge "Fix PhoneWindowManager#getUserRotationMode" into jb-mr2-dev
* commit '6ffce75fa78fba82bde8f1df5828d177457b7a7a': Fix PhoneWindowManager#getUserRotationMode
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 1fab35f..371f20e 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -4526,8 +4526,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
public int getUserRotationMode() {
return Settings.System.getIntForUser(mContext.getContentResolver(),
- Settings.System.USER_ROTATION, WindowManagerPolicy.USER_ROTATION_FREE,
- UserHandle.USER_CURRENT);
+ Settings.System.ACCELEROMETER_ROTATION, 0, UserHandle.USER_CURRENT) != 0 ?
+ WindowManagerPolicy.USER_ROTATION_FREE :
+ WindowManagerPolicy.USER_ROTATION_LOCKED;
}
// User rotation: to be used when all else fails in assigning an orientation to the device