aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java')
-rw-r--r--java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
index e42de0b4c..77940c086 100644
--- a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
+++ b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
@@ -105,8 +105,21 @@ public class AccessibleKeyboardViewProxy extends AccessibilityDelegateCompat {
}
/**
- * Receives hover events when accessibility is turned on in SDK versions ICS
- * and higher.
+ * Receives motion events when touch exploration is turned on in SDK
+ * versions ICS and higher.
+ *
+ * @param event The motion event.
+ * @return {@code true} if the event is handled
+ */
+ public boolean onTouchEvent(MotionEvent event) {
+ // To avoid accidental key presses during touch exploration, always drop
+ // non-hover touch events.
+ return false;
+ }
+
+ /**
+ * Receives hover events when touch exploration is turned on in SDK versions
+ * ICS and higher.
*
* @param event The hover event.
* @return {@code true} if the event is handled