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

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

Merge "Revert "Do not use last app rotation as default."" into jb-mr1-dev

parents ae268392 0f862b43
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -368,7 +368,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    boolean mScreenOnEarly = false;
    boolean mScreenOnFully = false;
    boolean mOrientationSensorEnabled = false;
    int mLastSensorRotation = -1;
    int mCurrentAppOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
    boolean mHasSoftInput = false;
    
@@ -3753,17 +3752,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        synchronized (mLock) {
            int sensorRotation = mOrientationListener.getProposedRotation(); // may be -1
            if (sensorRotation < 0) {
                // Sensor is disabled, device probably just turned off.
                if (mLastSensorRotation >= 0) {
                    sensorRotation = mLastSensorRotation;
                } else {
                    // Sensor has never been enabled. Last resort is to use lastRotation.
                sensorRotation = lastRotation;
            }
            } else {
                // Valid sensor data, save it away.
                mLastSensorRotation = sensorRotation;
            }

            final int preferredRotation;
            if (mLidState == LID_OPEN && mLidOpenRotation >= 0) {