Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +20 −0 Original line number Diff line number Diff line Loading @@ -2570,6 +2570,16 @@ public class PhoneWindowManager implements WindowManagerPolicy { } private int getCurrentLandscapeRotation(int lastRotation) { // if the user has locked rotation, we ignore the sensor if (mUserRotationMode == WindowManagerPolicy.USER_ROTATION_LOCKED) { if (isLandscapeOrSeascape(mUserRotation)) { return mUserRotation; } else { // it seems odd to obey the sensor at all if rotation lock is enabled return mLandscapeRotation; } } int sensorRotation = mOrientationListener.getCurrentRotation(lastRotation); if (isLandscapeOrSeascape(sensorRotation)) { return sensorRotation; Loading @@ -2587,6 +2597,16 @@ public class PhoneWindowManager implements WindowManagerPolicy { } private int getCurrentPortraitRotation(int lastRotation) { // if the user has locked rotation, we ignore the sensor if (mUserRotationMode == WindowManagerPolicy.USER_ROTATION_LOCKED) { if (isAnyPortrait(mUserRotation)) { return mUserRotation; } else { // it seems odd to obey the sensor at all if rotation lock is enabled return mPortraitRotation; } } int sensorRotation = mOrientationListener.getCurrentRotation(lastRotation); if (isAnyPortrait(sensorRotation)) { return sensorRotation; Loading Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +20 −0 Original line number Diff line number Diff line Loading @@ -2570,6 +2570,16 @@ public class PhoneWindowManager implements WindowManagerPolicy { } private int getCurrentLandscapeRotation(int lastRotation) { // if the user has locked rotation, we ignore the sensor if (mUserRotationMode == WindowManagerPolicy.USER_ROTATION_LOCKED) { if (isLandscapeOrSeascape(mUserRotation)) { return mUserRotation; } else { // it seems odd to obey the sensor at all if rotation lock is enabled return mLandscapeRotation; } } int sensorRotation = mOrientationListener.getCurrentRotation(lastRotation); if (isLandscapeOrSeascape(sensorRotation)) { return sensorRotation; Loading @@ -2587,6 +2597,16 @@ public class PhoneWindowManager implements WindowManagerPolicy { } private int getCurrentPortraitRotation(int lastRotation) { // if the user has locked rotation, we ignore the sensor if (mUserRotationMode == WindowManagerPolicy.USER_ROTATION_LOCKED) { if (isAnyPortrait(mUserRotation)) { return mUserRotation; } else { // it seems odd to obey the sensor at all if rotation lock is enabled return mPortraitRotation; } } int sensorRotation = mOrientationListener.getCurrentRotation(lastRotation); if (isAnyPortrait(sensorRotation)) { return sensorRotation; Loading