diff options
| author | 2011-01-23 13:38:51 -0800 | |
|---|---|---|
| committer | 2011-01-23 13:38:51 -0800 | |
| commit | f41806799ad70085722dd7d11e3f8043109290bf (patch) | |
| tree | 774aef443451eda067f3e4253345bd1723a1721b | |
| parent | f6834478b379856d3e5de92ddce7de0e6ba9fa4a (diff) | |
| parent | 892bd76881e2df9b4915a30144efc5428f7ab5a3 (diff) | |
Merge "Fix SENSOR_LANDSCAPE and SENSOR_PORTRAIT" into honeycomb
| -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 747242f468cf..0d0e89cc86de 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); } |