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

Commit f4180679 authored by Jeff Brown's avatar Jeff Brown Committed by Android (Google) Code Review
Browse files

Merge "Fix SENSOR_LANDSCAPE and SENSOR_PORTRAIT" into honeycomb

parents f6834478 892bd768
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);
            }