diff options
| author | Hiroshi Lockheimer <hiroshi@google.com> | 2010-11-05 13:58:04 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2010-11-05 13:58:04 -0700 |
| commit | 01128df3c442b87f601d9c13ff2ebd54b015925d (patch) | |
| tree | 4f717872d985874741da7b2244b38002d7958e16 | |
| parent | 3de641cbb9c825cef5cc29905ea88be98ac2ce4e (diff) | |
| parent | ce22d608733953e367a590efd9c7656a68ffc24d (diff) | |
| download | frameworks_base-01128df3c442b87f601d9c13ff2ebd54b015925d.zip frameworks_base-01128df3c442b87f601d9c13ff2ebd54b015925d.tar.gz frameworks_base-01128df3c442b87f601d9c13ff2ebd54b015925d.tar.bz2 | |
am ce22d608: Merge "allow all 4 orientations" into gingerbread
* commit 'ce22d608733953e367a590efd9c7656a68ffc24d':
allow all 4 orientations
| -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 |
