Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad99c287 authored by Mike Lockwood's avatar Mike Lockwood Committed by Android Git Automerger
Browse files

am f1f26bbb: Merge change I7b8b6cfb into eclair

Merge commit 'f1f26bbb' into eclair-mr2

* commit 'f1f26bbb':
  Do not force screen on when undocking from the desk dock.
parents d73f7de4 f1f26bbb
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -111,8 +111,17 @@ class DockObserver extends UEventObserver {
            try {
                int newState = Integer.parseInt(event.get("SWITCH_STATE"));
                if (newState != mDockState) {
                    int oldState = mDockState;
                    mDockState = newState;
                    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();
                    }
                }
@@ -166,7 +175,6 @@ class DockObserver extends UEventObserver {
                    return;
                }
                // Pack up the values and broadcast them to everyone
                mPowerManager.userActivityWithForce(SystemClock.uptimeMillis(), false, true);
                Intent intent = new Intent(Intent.ACTION_DOCK_EVENT);
                intent.putExtra(Intent.EXTRA_DOCK_STATE, mDockState);