summaryrefslogtreecommitdiff
path: root/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-07-10 19:31:02 -0700
committerTadashi G. Takaoka <takaoka@google.com>2011-07-10 19:48:14 -0700
commitf426cdd5c62452224ac4bb833c3ccf7b26d1a2a8 (patch)
treecd1170441af6b37b9acb70d4cdb7b3b9164c8ec1 /java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java
parent0efe174ea43fe576683102effbaef5be27575706 (diff)
Add KeyEventHandler interface
This change also revert KeyboardView to non-abstract class. Bug: 4768084 Change-Id: I827defb58bfb28b345464f6a89aa4438e41cf1e2
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java')
-rw-r--r--java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java
index 318e454d3..c4e37ff87 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.DrawingProxy;
import com.android.inputmethod.keyboard.PointerTracker.TimerProxy;
import com.android.inputmethod.keyboard.internal.MiniKeyboardBuilder;
import com.android.inputmethod.keyboard.internal.PointerTrackerQueue;
@@ -49,7 +50,7 @@ import java.util.WeakHashMap;
* @attr ref R.styleable#KeyboardView_verticalCorrection
* @attr ref R.styleable#KeyboardView_popupLayout
*/
-public class LatinKeyboardBaseView extends KeyboardView {
+public class LatinKeyboardBaseView extends KeyboardView implements PointerTracker.KeyEventHandler {
private static final String TAG = LatinKeyboardBaseView.class.getSimpleName();
private static final boolean ENABLE_CAPSLOCK_BY_LONGPRESS = true;
@@ -278,6 +279,11 @@ public class LatinKeyboardBaseView extends KeyboardView {
}
@Override
+ public DrawingProxy getDrawingProxy() {
+ return this;
+ }
+
+ @Override
public TimerProxy getTimerProxy() {
return mKeyTimerHandler;
}
@@ -589,11 +595,11 @@ public class LatinKeyboardBaseView extends KeyboardView {
}
private static void processMotionEvent(PointerTracker tracker, int action, int x, int y,
- long eventTime, KeyboardView keyboardView) {
+ long eventTime, PointerTracker.KeyEventHandler handler) {
switch (action) {
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_POINTER_DOWN:
- tracker.onDownEvent(x, y, eventTime, keyboardView);
+ tracker.onDownEvent(x, y, eventTime, handler);
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_POINTER_UP: