diff options
| author | 2009-10-22 16:24:05 -0400 | |
|---|---|---|
| committer | 2009-10-22 16:24:05 -0400 | |
| commit | 96e0c3156e21bbdb0d94201b08d80379b98c472a (patch) | |
| tree | 80aace75d11e26a2c3e53cdcc1879694a937fa4a | |
| parent | 4f82394af6486e1725ae6b6dd3b0334dcfc52747 (diff) | |
| parent | 3c9435a20597adec7ec2e110b92920b4a9ecb0e7 (diff) | |
Merge change Ia3f7ef64 into eclair
* changes:
PowerManager: Don't poke user activity in setKeyboardVisibility unless the state actually changed.
| -rw-r--r-- | services/java/com/android/server/PowerManagerService.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java index 29a5ba85ae64..b0c5950903fe 100644 --- a/services/java/com/android/server/PowerManagerService.java +++ b/services/java/com/android/server/PowerManagerService.java @@ -2007,12 +2007,14 @@ class PowerManagerService extends IPowerManager.Stub if (mSpew) { Log.d(TAG, "setKeyboardVisibility: " + visible); } - mKeyboardVisible = visible; - // don't signal user activity if the screen is off; other code - // will take care of turning on due to a true change to the lid - // switch and synchronized with the lock screen. - if ((mPowerState & SCREEN_ON_BIT) != 0) { - userActivity(SystemClock.uptimeMillis(), false, BUTTON_EVENT, true); + if (mKeyboardVisible != visible) { + mKeyboardVisible = visible; + // don't signal user activity if the screen is off; other code + // will take care of turning on due to a true change to the lid + // switch and synchronized with the lock screen. + if ((mPowerState & SCREEN_ON_BIT) != 0) { + userActivity(SystemClock.uptimeMillis(), false, BUTTON_EVENT, true); + } } } } |