summaryrefslogtreecommitdiff
path: root/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-07-08 18:35:58 -0700
committerTadashi G. Takaoka <takaoka@google.com>2011-07-08 19:15:16 -0700
commit2321caa1f9eb6c2d616bc36f11f5b48eebf144fe (patch)
tree4b9007e44283896d32914225c2f930ad59afad50 /java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java
parentab41391cb4e47ce1cc31cec1118525f77bef44dd (diff)
Narrower key timer handler static inner class to TimerProxy interface
Bug: 4768084 Change-Id: I8fdff864d09321b44d56a6a32e10aec3f0f5a4d1
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java')
-rw-r--r--java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java
index 60af1ecc2..06cd319de 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java
@@ -33,6 +33,7 @@ import android.widget.PopupWindow;
import com.android.inputmethod.accessibility.AccessibilityUtils;
import com.android.inputmethod.accessibility.AccessibleKeyboardViewProxy;
+import com.android.inputmethod.keyboard.PointerTracker.TimerProxy;
import com.android.inputmethod.keyboard.internal.MiniKeyboardBuilder;
import com.android.inputmethod.keyboard.internal.PointerTrackerQueue;
import com.android.inputmethod.latin.R;
@@ -86,7 +87,8 @@ public class LatinKeyboardBaseView extends KeyboardView {
private final KeyTimerHandler mKeyTimerHandler = new KeyTimerHandler(this);
- public static class KeyTimerHandler extends StaticInnerHandlerWrapper<LatinKeyboardBaseView> {
+ private static class KeyTimerHandler extends StaticInnerHandlerWrapper<LatinKeyboardBaseView>
+ implements TimerProxy {
private static final int MSG_REPEAT_KEY = 1;
private static final int MSG_LONGPRESS_KEY = 2;
private static final int MSG_LONGPRESS_SHIFT_KEY = 3;
@@ -116,6 +118,7 @@ public class LatinKeyboardBaseView extends KeyboardView {
}
}
+ @Override
public void startKeyRepeatTimer(long delay, int keyIndex, PointerTracker tracker) {
mInKeyRepeat = true;
sendMessageDelayed(obtainMessage(MSG_REPEAT_KEY, keyIndex, 0, tracker), delay);
@@ -130,11 +133,13 @@ public class LatinKeyboardBaseView extends KeyboardView {
return mInKeyRepeat;
}
+ @Override
public void startLongPressTimer(long delay, int keyIndex, PointerTracker tracker) {
cancelLongPressTimers();
sendMessageDelayed(obtainMessage(MSG_LONGPRESS_KEY, keyIndex, 0, tracker), delay);
}
+ @Override
public void startLongPressShiftTimer(long delay, int keyIndex, PointerTracker tracker) {
cancelLongPressTimers();
if (ENABLE_CAPSLOCK_BY_LONGPRESS) {
@@ -143,11 +148,13 @@ public class LatinKeyboardBaseView extends KeyboardView {
}
}
+ @Override
public void cancelLongPressTimers() {
removeMessages(MSG_LONGPRESS_KEY);
removeMessages(MSG_LONGPRESS_SHIFT_KEY);
}
+ @Override
public void cancelKeyTimers() {
cancelKeyRepeatTimer();
cancelLongPressTimers();