summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/PowerManagerService.java14
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 29a5ba8..b0c5950 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);
+ }
}
}
}