summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-12-07 16:05:48 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-12-07 16:05:48 -0800
commit0c5c2884542be5313007cb2ba22c409133e5ec5a (patch)
tree6dd03bbe3e5e32c5d701337bb1b7e98305d8d493 /policy
parent0fea67ce9124a6eef913febc70a2d7b3e0ca1c99 (diff)
parent03be4d9cf456b7ad82e6fbbdea2b4902cb0e4abb (diff)
downloadframeworks_base-0c5c2884542be5313007cb2ba22c409133e5ec5a.zip
frameworks_base-0c5c2884542be5313007cb2ba22c409133e5ec5a.tar.gz
frameworks_base-0c5c2884542be5313007cb2ba22c409133e5ec5a.tar.bz2
am 03be4d9c: am ff3b5a82: Merge "Make the dock orientation override the HDMI orientation." into ics-mr1
* commit '03be4d9cf456b7ad82e6fbbdea2b4902cb0e4abb': Make the dock orientation override the HDMI orientation.
Diffstat (limited to 'policy')
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index dfb1b07..9cdbcbae 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -3213,10 +3213,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
final int preferredRotation;
- if (mHdmiPlugged) {
- // Ignore sensor when plugged into HDMI.
- preferredRotation = mHdmiRotation;
- } else if (mLidOpen == LID_OPEN && mLidOpenRotation >= 0) {
+ if (mLidOpen == LID_OPEN && mLidOpenRotation >= 0) {
// Ignore sensor when lid switch is open and rotation is forced.
preferredRotation = mLidOpenRotation;
} else if (mDockMode == Intent.EXTRA_DOCK_STATE_CAR
@@ -3235,6 +3232,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
// enable 180 degree rotation while docked.
preferredRotation = mDeskDockEnablesAccelerometer
? sensorRotation : mDeskDockRotation;
+ } else if (mHdmiPlugged) {
+ // Ignore sensor when plugged into HDMI.
+ // Note that the dock orientation overrides the HDMI orientation.
+ preferredRotation = mHdmiRotation;
} else if ((mAccelerometerDefault != 0 /* implies not rotation locked */
&& (orientation == ActivityInfo.SCREEN_ORIENTATION_USER
|| orientation == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED))