Merge "Simplifying accessibility code in keyboard's dispatchTouchEvent()"
This commit is contained in:
commit
f12aa77c4b
2 changed files with 2 additions and 11 deletions
java/src/com/android/inputmethod
|
@ -118,15 +118,6 @@ public class AccessibleKeyboardViewProxy {
|
|||
return onHoverEventInternal(event, tracker);
|
||||
}
|
||||
|
||||
public boolean dispatchTouchEvent(MotionEvent event) {
|
||||
// Since touch exploration translates hover double-tap to a regular
|
||||
// single-tap, we're going to drop non-touch exploration events.
|
||||
if (!AccessibilityUtils.getInstance().isTouchExplorationEvent(event))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles touch exploration events when Accessibility is turned on.
|
||||
*
|
||||
|
|
|
@ -567,9 +567,9 @@ public class LatinKeyboardBaseView extends KeyboardView implements PointerTracke
|
|||
|
||||
@Override
|
||||
public boolean dispatchTouchEvent(MotionEvent event) {
|
||||
// Drop non-hover touch events when touch exploration is enabled.
|
||||
if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
|
||||
return AccessibleKeyboardViewProxy.getInstance().dispatchTouchEvent(event)
|
||||
|| super.dispatchTouchEvent(event);
|
||||
return false;
|
||||
}
|
||||
|
||||
return super.dispatchTouchEvent(event);
|
||||
|
|
Loading…
Reference in a new issue