Do not advance mLastEventTime when enabling or disabling user activity.

Fixes a race condition between the keyguard and power key that sometimes resulted
in the power key failing to turn off the screen.

Fixes bug b/2212852 (Power button does not put phone to sleep)

Change-Id: I92498c5fddf2bfc32b105ea1a7ea14a06d83888e
Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2009-11-02 11:56:04 -05:00
parent 9efd523c46
commit f1d14f6a33

View File

@ -2079,7 +2079,6 @@ class PowerManagerService extends IPowerManager.Stub
public void enableUserActivity(boolean enabled) {
synchronized (mLocks) {
mUserActivityAllowed = enabled;
mLastEventTime = SystemClock.uptimeMillis(); // we might need to pass this in
}
}