Merge commit 'ad99c2876cf57a61829ac0b03ee48fa86a51da6b' into eclair-mr2-plus-aosp * commit 'ad99c2876cf57a61829ac0b03ee48fa86a51da6b': Do not force screen on when undocking from the desk dock.
This commit is contained in:
@@ -111,8 +111,17 @@ class DockObserver extends UEventObserver {
|
|||||||
try {
|
try {
|
||||||
int newState = Integer.parseInt(event.get("SWITCH_STATE"));
|
int newState = Integer.parseInt(event.get("SWITCH_STATE"));
|
||||||
if (newState != mDockState) {
|
if (newState != mDockState) {
|
||||||
|
int oldState = mDockState;
|
||||||
mDockState = newState;
|
mDockState = newState;
|
||||||
if (mSystemReady) {
|
if (mSystemReady) {
|
||||||
|
// Don't force screen on when undocking from the desk dock.
|
||||||
|
// The change in power state will do this anyway.
|
||||||
|
// FIXME - we should be configurable.
|
||||||
|
if (oldState != Intent.EXTRA_DOCK_STATE_DESK ||
|
||||||
|
newState != Intent.EXTRA_DOCK_STATE_UNDOCKED) {
|
||||||
|
mPowerManager.userActivityWithForce(SystemClock.uptimeMillis(),
|
||||||
|
false, true);
|
||||||
|
}
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -166,7 +175,6 @@ class DockObserver extends UEventObserver {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Pack up the values and broadcast them to everyone
|
// Pack up the values and broadcast them to everyone
|
||||||
mPowerManager.userActivityWithForce(SystemClock.uptimeMillis(), false, true);
|
|
||||||
Intent intent = new Intent(Intent.ACTION_DOCK_EVENT);
|
Intent intent = new Intent(Intent.ACTION_DOCK_EVENT);
|
||||||
intent.putExtra(Intent.EXTRA_DOCK_STATE, mDockState);
|
intent.putExtra(Intent.EXTRA_DOCK_STATE, mDockState);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user