Merge "Make the dock orientation override the HDMI orientation." into ics-mr1
This commit is contained in:
@@ -3134,10 +3134,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final int preferredRotation;
|
final int preferredRotation;
|
||||||
if (mHdmiPlugged) {
|
if (mLidOpen == LID_OPEN && mLidOpenRotation >= 0) {
|
||||||
// Ignore sensor when plugged into HDMI.
|
|
||||||
preferredRotation = mHdmiRotation;
|
|
||||||
} else if (mLidOpen == LID_OPEN && mLidOpenRotation >= 0) {
|
|
||||||
// Ignore sensor when lid switch is open and rotation is forced.
|
// Ignore sensor when lid switch is open and rotation is forced.
|
||||||
preferredRotation = mLidOpenRotation;
|
preferredRotation = mLidOpenRotation;
|
||||||
} else if (mDockMode == Intent.EXTRA_DOCK_STATE_CAR
|
} else if (mDockMode == Intent.EXTRA_DOCK_STATE_CAR
|
||||||
@@ -3156,6 +3153,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
// enable 180 degree rotation while docked.
|
// enable 180 degree rotation while docked.
|
||||||
preferredRotation = mDeskDockEnablesAccelerometer
|
preferredRotation = mDeskDockEnablesAccelerometer
|
||||||
? sensorRotation : mDeskDockRotation;
|
? 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 */
|
} else if ((mAccelerometerDefault != 0 /* implies not rotation locked */
|
||||||
&& (orientation == ActivityInfo.SCREEN_ORIENTATION_USER
|
&& (orientation == ActivityInfo.SCREEN_ORIENTATION_USER
|
||||||
|| orientation == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED))
|
|| orientation == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED))
|
||||||
|
|||||||
Reference in New Issue
Block a user