diff options
author | Hiroshi Lockheimer <hiroshi@google.com> | 2010-11-05 05:20:59 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-11-05 05:21:00 +0000 |
commit | ce22d608733953e367a590efd9c7656a68ffc24d (patch) | |
tree | 7cec917ece4530a606a17166ae6b8b9c576f258a | |
parent | 4ebbfa8a44da790eb13e7e88314bd0a648f8b891 (diff) | |
parent | 1d8d0159e72556ea20aba325fb27d8470282e1ba (diff) | |
download | frameworks_base-ce22d608733953e367a590efd9c7656a68ffc24d.zip frameworks_base-ce22d608733953e367a590efd9c7656a68ffc24d.tar.gz frameworks_base-ce22d608733953e367a590efd9c7656a68ffc24d.tar.bz2 |
Merge "allow all 4 orientations" into gingerbread
-rwxr-xr-x | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 9 |
1 files changed, 7 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 43936a4..a277bcb 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -111,6 +111,7 @@ import android.view.animation.AnimationUtils; import android.media.IAudioService; import android.media.AudioManager; +import java.io.File; import java.util.ArrayList; /** @@ -2114,8 +2115,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { return getCurrentPortraitRotation(lastRotation); } - mOrientationListener.setAllow180Rotation( - orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR); + if (new File("/system/etc/allow_all_orientations").exists()) { + mOrientationListener.setAllow180Rotation(true); + } else { + mOrientationListener.setAllow180Rotation( + orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR); + } // case for nosensor meaning ignore sensor and consider only lid // or orientation sensor disabled |