am ebfae7f5: Merge "Fix key repeat interval timeout"

* commit 'ebfae7f5e0a9003870a3e7dd55ba16fd6ce37df9':
  Fix key repeat interval timeout
main
Tadashi G. Takaoka 2012-02-02 18:24:28 -08:00 committed by Android Git Automerger
commit 3deebdeda2
1 changed files with 6 additions and 3 deletions

View File

@ -132,7 +132,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
switch (msg.what) {
case MSG_REPEAT_KEY:
tracker.onRepeatKey(tracker.getKey());
startKeyRepeatTimer(tracker);
startKeyRepeatTimer(tracker, mParams.mKeyRepeatInterval);
break;
case MSG_LONGPRESS_KEY:
if (tracker != null) {
@ -144,11 +144,14 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
}
}
private void startKeyRepeatTimer(PointerTracker tracker, long delay) {
sendMessageDelayed(obtainMessage(MSG_REPEAT_KEY, tracker), delay);
}
@Override
public void startKeyRepeatTimer(PointerTracker tracker) {
mInKeyRepeat = true;
sendMessageDelayed(obtainMessage(MSG_REPEAT_KEY, tracker),
mParams.mKeyRepeatStartTimeout);
startKeyRepeatTimer(tracker, mParams.mKeyRepeatStartTimeout);
}
public void cancelKeyRepeatTimer() {