diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-01-23 13:42:50 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-01-23 13:42:50 -0800 |
commit | 3f3e3839755d122c8d14fdd37a9237fba521e6b9 (patch) | |
tree | afc9dc8775ac56cc0cd863e9c14821a326754ee3 /policy | |
parent | 2128983c3818f4b51bcaa12ccd8b208645944a16 (diff) | |
parent | 5f1e37a736928bbb38f665d12812a1bed3394fa3 (diff) | |
download | frameworks_base-3f3e3839755d122c8d14fdd37a9237fba521e6b9.zip frameworks_base-3f3e3839755d122c8d14fdd37a9237fba521e6b9.tar.gz frameworks_base-3f3e3839755d122c8d14fdd37a9237fba521e6b9.tar.bz2 |
am 5f1e37a7: am f4180679: Merge "Fix SENSOR_LANDSCAPE and SENSOR_PORTRAIT" into honeycomb
* commit '5f1e37a736928bbb38f665d12812a1bed3394fa3':
Fix SENSOR_LANDSCAPE and SENSOR_PORTRAIT
Diffstat (limited to 'policy')
-rwxr-xr-x | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 6 |
1 files changed, 4 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 747242f..0d0e89c 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -2481,10 +2481,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { return mSeascapeRotation; case ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE: //return either landscape rotation based on the sensor - mOrientationListener.setAllow180Rotation(false); + mOrientationListener.setAllow180Rotation( + isLandscapeOrSeascape(Surface.ROTATION_180)); return getCurrentLandscapeRotation(lastRotation); case ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT: - mOrientationListener.setAllow180Rotation(true); + mOrientationListener.setAllow180Rotation( + !isLandscapeOrSeascape(Surface.ROTATION_180)); return getCurrentPortraitRotation(lastRotation); } |