diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-10-05 17:24:29 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-10-05 17:24:29 -0700 |
commit | 219f3c71269ff0bd8949b88af07f92c4e4eddc67 (patch) | |
tree | 4f1ee647435a82a5908ca02c9780bf108bf012a5 /policy | |
parent | 39382aa77a6c50eb4b7292c1d5063a2934c3f36c (diff) | |
parent | 4dfce20cac7492882d366d053006795aefad59da (diff) | |
download | frameworks_base-219f3c71269ff0bd8949b88af07f92c4e4eddc67.zip frameworks_base-219f3c71269ff0bd8949b88af07f92c4e4eddc67.tar.gz frameworks_base-219f3c71269ff0bd8949b88af07f92c4e4eddc67.tar.bz2 |
Merge "Make SENSOR orientation modes trump rotation lock. Bug: 5371750"
Diffstat (limited to 'policy')
-rwxr-xr-x | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index ed67707..989ccf7 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -2947,10 +2947,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { // enable 180 degree rotation while docked. preferredRotation = mDeskDockEnablesAccelerometer ? sensorRotation : mDeskDockRotation; - } else if (mUserRotationMode == WindowManagerPolicy.USER_ROTATION_LOCKED) { - // Ignore sensor when user locked rotation. - preferredRotation = mUserRotation; - } else if ((mAccelerometerDefault != 0 + } else if ((mAccelerometerDefault != 0 /* implies not rotation locked */ && (orientation == ActivityInfo.SCREEN_ORIENTATION_USER || orientation == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)) || orientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR @@ -2973,6 +2970,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { } else { preferredRotation = lastRotation; } + } else if (mUserRotationMode == WindowManagerPolicy.USER_ROTATION_LOCKED) { + // Apply rotation lock. + preferredRotation = mUserRotation; } // TODO: Sometimes, we might want to override the application-requested @@ -3018,8 +3018,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { return mPortraitRotation; default: - // For USER, UNSPECIFIED and NOSENSOR, just return the preferred - // orientation we already calculated. + // For USER, UNSPECIFIED, NOSENSOR, SENSOR and FULL_SENSOR, + // just return the preferred orientation we already calculated. if (preferredRotation >= 0) { return preferredRotation; } |