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>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user