am d8bdc06f: Fix SENSOR_LANDSCAPE and SENSOR_PORTRAIT (DO NOT MERGE)

* commit 'd8bdc06f8139231f1edc1a8bf22b637ebb790605':
  Fix SENSOR_LANDSCAPE and SENSOR_PORTRAIT (DO NOT MERGE)
This commit is contained in:
Jeff Brown
2011-01-24 17:38:32 -08:00
committed by Android Git Automerger

View File

@@ -2083,10 +2083,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
return mSeascapeRotation; return mSeascapeRotation;
case ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE: case ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE:
//return either landscape rotation based on the sensor //return either landscape rotation based on the sensor
mOrientationListener.setAllow180Rotation(false); mOrientationListener.setAllow180Rotation(
isLandscapeOrSeascape(Surface.ROTATION_180));
return getCurrentLandscapeRotation(lastRotation); return getCurrentLandscapeRotation(lastRotation);
case ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT: case ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT:
mOrientationListener.setAllow180Rotation(true); mOrientationListener.setAllow180Rotation(
!isLandscapeOrSeascape(Surface.ROTATION_180));
return getCurrentPortraitRotation(lastRotation); return getCurrentPortraitRotation(lastRotation);
} }