Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f1e37a7 authored by Jeff Brown's avatar Jeff Brown Committed by Android Git Automerger
Browse files

am f4180679: Merge "Fix SENSOR_LANDSCAPE and SENSOR_PORTRAIT" into honeycomb

* commit 'f4180679':
  Fix SENSOR_LANDSCAPE and SENSOR_PORTRAIT
parents 73fafb38 f4180679
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);
            }