Merge "Handle EXTRA_DOCK_STATE_LE_DESK and HE_DESK. Bug: 5569662" into ics-mr1
This commit is contained in:
@ -493,7 +493,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if ((mCarDockEnablesAccelerometer && mDockMode == Intent.EXTRA_DOCK_STATE_CAR) ||
|
if ((mCarDockEnablesAccelerometer && mDockMode == Intent.EXTRA_DOCK_STATE_CAR) ||
|
||||||
(mDeskDockEnablesAccelerometer && mDockMode == Intent.EXTRA_DOCK_STATE_DESK)) {
|
(mDeskDockEnablesAccelerometer && (mDockMode == Intent.EXTRA_DOCK_STATE_DESK
|
||||||
|
|| mDockMode == Intent.EXTRA_DOCK_STATE_LE_DESK
|
||||||
|
|| mDockMode == Intent.EXTRA_DOCK_STATE_HE_DESK))) {
|
||||||
// enable accelerometer if we are docked in a dock that enables accelerometer
|
// enable accelerometer if we are docked in a dock that enables accelerometer
|
||||||
// orientation management,
|
// orientation management,
|
||||||
return true;
|
return true;
|
||||||
@ -3137,7 +3139,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
// enable 180 degree rotation while docked.
|
// enable 180 degree rotation while docked.
|
||||||
preferredRotation = mCarDockEnablesAccelerometer
|
preferredRotation = mCarDockEnablesAccelerometer
|
||||||
? sensorRotation : mCarDockRotation;
|
? sensorRotation : mCarDockRotation;
|
||||||
} else if (mDockMode == Intent.EXTRA_DOCK_STATE_DESK
|
} else if ((mDockMode == Intent.EXTRA_DOCK_STATE_DESK
|
||||||
|
|| mDockMode == Intent.EXTRA_DOCK_STATE_LE_DESK
|
||||||
|
|| mDockMode == Intent.EXTRA_DOCK_STATE_HE_DESK)
|
||||||
&& (mDeskDockEnablesAccelerometer || mDeskDockRotation >= 0)) {
|
&& (mDeskDockEnablesAccelerometer || mDeskDockRotation >= 0)) {
|
||||||
// Ignore sensor when in desk dock unless explicitly enabled.
|
// Ignore sensor when in desk dock unless explicitly enabled.
|
||||||
// This case can override the behavior of NOSENSOR, and can also
|
// This case can override the behavior of NOSENSOR, and can also
|
||||||
|
@ -82,7 +82,9 @@ class DockObserver extends UEventObserver {
|
|||||||
// Don't force screen on when undocking from the desk dock.
|
// Don't force screen on when undocking from the desk dock.
|
||||||
// The change in power state will do this anyway.
|
// The change in power state will do this anyway.
|
||||||
// FIXME - we should be configurable.
|
// FIXME - we should be configurable.
|
||||||
if (mPreviousDockState != Intent.EXTRA_DOCK_STATE_DESK ||
|
if ((mPreviousDockState != Intent.EXTRA_DOCK_STATE_DESK
|
||||||
|
&& mPreviousDockState != Intent.EXTRA_DOCK_STATE_LE_DESK
|
||||||
|
&& mPreviousDockState != Intent.EXTRA_DOCK_STATE_HE_DESK) ||
|
||||||
mDockState != Intent.EXTRA_DOCK_STATE_UNDOCKED) {
|
mDockState != Intent.EXTRA_DOCK_STATE_UNDOCKED) {
|
||||||
mPowerManager.userActivityWithForce(SystemClock.uptimeMillis(),
|
mPowerManager.userActivityWithForce(SystemClock.uptimeMillis(),
|
||||||
false, true);
|
false, true);
|
||||||
|
Reference in New Issue
Block a user