Skip to content

Commit 42af2ac

Browse files
Jeff BrownAndroid (Google) Code Review
authored andcommitted
Merge "Revert "Do not use last app rotation as default."" into jb-mr1-dev
2 parents ae26839 + 0f862b4 commit 42af2ac

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
368368
boolean mScreenOnEarly = false;
369369
boolean mScreenOnFully = false;
370370
boolean mOrientationSensorEnabled = false;
371-
int mLastSensorRotation = -1;
372371
int mCurrentAppOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
373372
boolean mHasSoftInput = false;
374373

@@ -3753,16 +3752,7 @@ public int rotationForOrientationLw(int orientation, int lastRotation) {
37533752
synchronized (mLock) {
37543753
int sensorRotation = mOrientationListener.getProposedRotation(); // may be -1
37553754
if (sensorRotation < 0) {
3756-
// Sensor is disabled, device probably just turned off.
3757-
if (mLastSensorRotation >= 0) {
3758-
sensorRotation = mLastSensorRotation;
3759-
} else {
3760-
// Sensor has never been enabled. Last resort is to use lastRotation.
3761-
sensorRotation = lastRotation;
3762-
}
3763-
} else {
3764-
// Valid sensor data, save it away.
3765-
mLastSensorRotation = sensorRotation;
3755+
sensorRotation = lastRotation;
37663756
}
37673757

37683758
final int preferredRotation;

0 commit comments

Comments
 (0)