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

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

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

* commit 'd8bdc06f':
  Fix SENSOR_LANDSCAPE and SENSOR_PORTRAIT (DO NOT MERGE)
parents ca1cf59f d8bdc06f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2083,10 +2083,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);
            }