Skip to content
Snippets Groups Projects
Commit 1a0cd086 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Add onRegisterHoverKey to accessibility delegate

Bug: 12491371
Change-Id: I8c5b1e91f41146a023edcc405e6120c0bf33f49b
parent a2b7c07e
No related branches found
No related tags found
No related merge requests found
......@@ -222,13 +222,23 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView>
// Make sure we're not getting an EXIT event because the user slid
// off the keyboard area, then force a key press.
if (key != null) {
simulateTouchEvent(MotionEvent.ACTION_DOWN, event);
simulateTouchEvent(MotionEvent.ACTION_UP, event);
onRegisterHoverKey(key, event);
onHoverExitKey(key);
}
setLastHoverKey(null);
}
/**
* Register a key that is selected by a hover event
*
* @param key A key to be registered.
* @param event A hover exit event that triggers key registering.
*/
protected void onRegisterHoverKey(final Key key, final MotionEvent event) {
simulateTouchEvent(MotionEvent.ACTION_DOWN, event);
simulateTouchEvent(MotionEvent.ACTION_UP, event);
}
/**
* Simulating a touch event by injecting a synthesized touch event into {@link PointerTracker}.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment