aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-06-04 03:09:30 +0000
committerTadashi G. Takaoka <takaoka@google.com>2014-06-04 16:04:36 +0900
commit2c35f3bdd58926e385f663b2394d89a09ef3cc0d (patch)
tree96f224c35bb4ccc753564ccdcde42f0812cbbe49
parent2660b70f806b5b8eb4aca8abf1fb734a21773d29 (diff)
downloadlatinime-2c35f3bdd58926e385f663b2394d89a09ef3cc0d.tar.gz
latinime-2c35f3bdd58926e385f663b2394d89a09ef3cc0d.tar.xz
latinime-2c35f3bdd58926e385f663b2394d89a09ef3cc0d.zip
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
-rw-r--r--java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java21
1 files 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<KV extends KeyboardView>
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<KV extends KeyboardView>
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<KV extends KeyboardView>
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<KV extends KeyboardView>
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<KV extends KeyboardView>
* 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<KV extends KeyboardView>
* 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();