summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2009-10-21 22:58:29 -0400
committerMike Lockwood <lockwood@android.com>2009-10-21 23:08:13 -0400
commit3d0ea72dd74bb0a7ad082a82dbf53df11a4f487c (patch)
treebe58a4395c3e4f119c38501bc847799ffaa833ed /services
parentf003c0c15d28fbd70f00aa8a4529cc081a21e0f0 (diff)
downloadframeworks_base-3d0ea72dd74bb0a7ad082a82dbf53df11a4f487c.zip
frameworks_base-3d0ea72dd74bb0a7ad082a82dbf53df11a4f487c.tar.gz
frameworks_base-3d0ea72dd74bb0a7ad082a82dbf53df11a4f487c.tar.bz2
Add WindowManagerPolicy.allowKeyRepeat() method for disabling key repeats.
Part of a fix for bug b/2198537 Change-Id: I99dc64772fa7644b12432d5549603025196ea3e2 Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/WindowManagerService.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 9caa386..e743513 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -6227,6 +6227,13 @@ public class WindowManagerService extends IWindowManager.Stub
lt.sample("2 got event ", System.nanoTime() - ev.whenNano);
}
+ if (lastKey != null && !mPolicy.allowKeyRepeat()) {
+ // cancel key repeat at the request of the policy.
+ lastKey = null;
+ downTime = 0;
+ lastKeyTime = curTime;
+ nextKeyTime = curTime + LONG_WAIT;
+ }
try {
if (ev != null) {
curTime = SystemClock.uptimeMillis();