From 2c35f3bdd58926e385f663b2394d89a09ef3cc0d Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 4 Jun 2014 03:09:30 +0000 Subject: [PATCH] Revert "Pass hover event to accessibility key handling methods" It turns out passing hover event to accessibility key handling methods isn't necessary. This parically reverts I1f7feef707. Bug: 12491371 Change-Id: I9d71cd29723344433427795e44cb22ac41faace6 --- .../KeyboardAccessibilityDelegate.java | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java index bbc18f020..c9270b88d 100644 --- a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java +++ b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java @@ -181,7 +181,7 @@ public class KeyboardAccessibilityDelegate protected void onHoverEnter(final MotionEvent event) { final Key key = getHoverKeyOf(event); if (key != null) { - onHoverEnterKey(key, event); + onHoverEnterKey(key); } setLastHoverKey(key); } @@ -196,14 +196,14 @@ public class KeyboardAccessibilityDelegate final Key key = getHoverKeyOf(event); if (key != lastKey) { if (lastKey != null) { - onHoverExitKey(lastKey, event); + onHoverExitKey(lastKey); } if (key != null) { - onHoverEnterKey(key, event); + onHoverEnterKey(key); } } if (key != null) { - onHoverMoveKey(key, event); + onHoverMoveKey(key); } setLastHoverKey(key); } @@ -216,7 +216,7 @@ public class KeyboardAccessibilityDelegate protected void onHoverExit(final MotionEvent event) { final Key lastKey = getLastHoverKey(); if (lastKey != null) { - onHoverExitKey(lastKey, event); + onHoverExitKey(lastKey); } final Key key = getHoverKeyOf(event); // Make sure we're not getting an EXIT event because the user slid @@ -224,7 +224,7 @@ public class KeyboardAccessibilityDelegate if (key != null) { simulateTouchEvent(MotionEvent.ACTION_DOWN, event); simulateTouchEvent(MotionEvent.ACTION_UP, event); - onHoverExitKey(key, event); + onHoverExitKey(key); } setLastHoverKey(null); } @@ -263,9 +263,8 @@ public class KeyboardAccessibilityDelegate * Handles a hover enter event on a key. * * @param key The currently hovered key. - * @param event The hover event that triggers a call to this method. */ - protected void onHoverEnterKey(final Key key, final MotionEvent event) { + protected void onHoverEnterKey(final Key key) { key.onPressed(); mKeyboardView.invalidateKey(key); final KeyboardAccessibilityNodeProvider provider = getAccessibilityNodeProvider(); @@ -277,17 +276,15 @@ public class KeyboardAccessibilityDelegate * Handles a hover move event on a key. * * @param key The currently hovered key. - * @param event The hover event that triggers a call to this method. */ - protected void onHoverMoveKey(final Key key, final MotionEvent event) { } + protected void onHoverMoveKey(final Key key) { } /** * Handles a hover exit event on a key. * * @param key The currently hovered key. - * @param event The hover event that triggers a call to this method. */ - protected void onHoverExitKey(final Key key, final MotionEvent event) { + protected void onHoverExitKey(final Key key) { key.onReleased(); mKeyboardView.invalidateKey(key); final KeyboardAccessibilityNodeProvider provider = getAccessibilityNodeProvider();