diff options
author | Mike Lockwood <lockwood@android.com> | 2009-10-21 23:01:07 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2009-10-21 23:01:07 -0400 |
commit | fcb39240b15402c2f5e4ba6fe91c916e9a6039f1 (patch) | |
tree | 1b30db4a8620d3fc37f00a04d3d1746f903ed2a3 /policy/com | |
parent | 22dfe722dfb1094cfc5be0f155f3930bf39e5d61 (diff) | |
download | frameworks_base-fcb39240b15402c2f5e4ba6fe91c916e9a6039f1.zip frameworks_base-fcb39240b15402c2f5e4ba6fe91c916e9a6039f1.tar.gz frameworks_base-fcb39240b15402c2f5e4ba6fe91c916e9a6039f1.tar.bz2 |
Disable key repeats when the screen is off.
This prevents an endless stream of key repeats spamming the keyguard
if a volume key is pressed at the same time you turn off the screen
with the power button.
This is part of a fix for bug b/2198537
Change-Id: I0d7e335fee79cbebba96b2cd908458c3c94c839e
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'policy/com')
-rwxr-xr-x | policy/com/android/internal/policy/impl/PhoneWindowManager.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/policy/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/com/android/internal/policy/impl/PhoneWindowManager.java index 4699638..d376341 100755 --- a/policy/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/com/android/internal/policy/impl/PhoneWindowManager.java @@ -2218,5 +2218,10 @@ public class PhoneWindowManager implements WindowManagerPolicy { mPowerManager.userActivity(curTime, false, LocalPowerManager.OTHER_EVENT); } } + + public boolean allowKeyRepeat() { + // disable key repeat when screen is off + return mScreenOn; + } } |