From 800ab579a96bcb51d1e841b745de646d0b2b7895 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Mon, 17 Feb 2014 17:09:06 +0900 Subject: [PATCH] Remove unnecessary override of MainKeyboardView.dispatchTouchEvent Bug: 11721001 Bug: 11976254 Change-Id: I762bd9e76ea31d67b3e31c3a0a19ee9f040015b8 --- .../accessibility/AccessibleKeyboardViewProxy.java | 13 ------------- .../inputmethod/keyboard/MainKeyboardView.java | 8 -------- 2 files changed, 21 deletions(-) diff --git a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java index d0d5399c6..0043b7844 100644 --- a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java +++ b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java @@ -203,19 +203,6 @@ public final class AccessibleKeyboardViewProxy extends AccessibilityDelegateComp return getAccessibilityNodeProvider(); } - /** - * Intercepts touch events before dispatch when touch exploration is turned on in ICS and - * higher. - * - * @param event The motion event being dispatched. - * @return {@code true} if the event is handled - */ - public boolean dispatchTouchEvent(final MotionEvent event) { - // To avoid accidental key presses during touch exploration, always drop - // touch events generated by the user. - return false; - } - /** * Receives hover events when touch exploration is turned on in SDK versions ICS and higher. * diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java index bd955ae6a..6c56b8aab 100644 --- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java @@ -725,14 +725,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack return mKeyTimerHandler.isInDoubleTapShiftKeyTimeout(); } - @Override - public boolean dispatchTouchEvent(MotionEvent event) { - if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) { - return AccessibleKeyboardViewProxy.getInstance().dispatchTouchEvent(event); - } - return super.dispatchTouchEvent(event); - } - @Override public boolean onTouchEvent(final MotionEvent me) { if (getKeyboard() == null) {