mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Simplifying accessibility code in keyboard's dispatchTouchEvent()"
This commit is contained in:
commit
f12aa77c4b
@ -118,15 +118,6 @@ public class AccessibleKeyboardViewProxy {
|
|||||||
return onHoverEventInternal(event, tracker);
|
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.
|
* Handles touch exploration events when Accessibility is turned on.
|
||||||
*
|
*
|
||||||
|
@ -567,9 +567,9 @@ public class LatinKeyboardBaseView extends KeyboardView implements PointerTracke
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean dispatchTouchEvent(MotionEvent event) {
|
public boolean dispatchTouchEvent(MotionEvent event) {
|
||||||
|
// Drop non-hover touch events when touch exploration is enabled.
|
||||||
if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
|
if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
|
||||||
return AccessibleKeyboardViewProxy.getInstance().dispatchTouchEvent(event)
|
return false;
|
||||||
|| super.dispatchTouchEvent(event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.dispatchTouchEvent(event);
|
return super.dispatchTouchEvent(event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user