mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Fixed duplicate call to dispatchOnPopulateAccessibilityEvent()"
This commit is contained in:
commit
3ca85794a0
@ -105,13 +105,13 @@ public class AccessibleKeyboardViewProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Receives hover events when accessibility is turned on in API > 11. In
|
* Receives hover events when accessibility is turned on in SDK versions ICS
|
||||||
* earlier API levels, events are manually routed from onTouchEvent.
|
* and higher.
|
||||||
*
|
*
|
||||||
* @param event The hover event.
|
* @param event The hover event.
|
||||||
* @return {@code true} if the event is handled
|
* @return {@code true} if the event is handled
|
||||||
*/
|
*/
|
||||||
public boolean onHoverEvent(MotionEvent event, PointerTracker tracker) {
|
public boolean dispatchHoverEvent(MotionEvent event, PointerTracker tracker) {
|
||||||
if (mGestureDetector.onHoverEvent(event, this, tracker))
|
if (mGestureDetector.onHoverEvent(event, this, tracker))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -586,15 +586,22 @@ public class LatinKeyboardBaseView extends KeyboardView implements PointerTracke
|
|||||||
return super.dispatchPopulateAccessibilityEvent(event);
|
return super.dispatchPopulateAccessibilityEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onHoverEvent(MotionEvent event) {
|
/**
|
||||||
// Since reflection doesn't support calling superclass methods, this
|
* Receives hover events from the input framework. This method overrides
|
||||||
// method checks for the existence of onHoverEvent() in the View class
|
* View.dispatchHoverEvent(MotionEvent) on SDK version ICS or higher. On
|
||||||
// before returning a value.
|
* lower SDK versions, this method is never called.
|
||||||
|
*
|
||||||
|
* @param event The motion event to be dispatched.
|
||||||
|
* @return {@code true} if the event was handled by the view, {@code false}
|
||||||
|
* otherwise
|
||||||
|
*/
|
||||||
|
public boolean dispatchHoverEvent(MotionEvent event) {
|
||||||
if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
|
if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
|
||||||
final PointerTracker tracker = getPointerTracker(0);
|
final PointerTracker tracker = getPointerTracker(0);
|
||||||
return AccessibleKeyboardViewProxy.getInstance().onHoverEvent(event, tracker);
|
return AccessibleKeyboardViewProxy.getInstance().dispatchHoverEvent(event, tracker);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reflection doesn't support calling superclass methods.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user