summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-01-23 13:42:50 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-01-23 13:42:50 -0800
commit3f3e3839755d122c8d14fdd37a9237fba521e6b9 (patch)
treeafc9dc8775ac56cc0cd863e9c14821a326754ee3 /policy
parent2128983c3818f4b51bcaa12ccd8b208645944a16 (diff)
parent5f1e37a736928bbb38f665d12812a1bed3394fa3 (diff)
downloadframeworks_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-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java6
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);
}