aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-06-13 15:20:49 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-06-13 15:54:25 +0900
commit08199ec85932dbcfd02763a88d32b4c33f94ef31 (patch)
treecced30e9ec61f1da940670c9967279a3a116c6a2 /java/src
parent03eba0927dfb82c890c0745840bc6098240c04d4 (diff)
downloadlatinime-08199ec85932dbcfd02763a88d32b4c33f94ef31.tar.gz
latinime-08199ec85932dbcfd02763a88d32b4c33f94ef31.tar.xz
latinime-08199ec85932dbcfd02763a88d32b4c33f94ef31.zip
Clear PointerTracker state when more keys keyboard is dismissed
With accessibility mode on, hover events for a more keys keyboard are handled among MoreKeysKeyboardAccessibilityDelegate and MoreKeysKeyboardView. But the more keys keyboard is shown by MainKeyboardAccessibilityDelegate that uses PointerTracker to handle hover events. Thus we need to clear PointerTracker state when the more keys keyboard is dismissed. This is a workaround to resolve the issue. We should reconsider the structure of those views and accessibility delegates in the future. Bug: 15583751 Change-Id: Ida8c3e55194c59bdaa5bc4ff06068e699b888ced
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/accessibility/MoreKeysKeyboardAccessibilityDelegate.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/accessibility/MoreKeysKeyboardAccessibilityDelegate.java b/java/src/com/android/inputmethod/accessibility/MoreKeysKeyboardAccessibilityDelegate.java
index 331c26786..6fe8bc3b9 100644
--- a/java/src/com/android/inputmethod/accessibility/MoreKeysKeyboardAccessibilityDelegate.java
+++ b/java/src/com/android/inputmethod/accessibility/MoreKeysKeyboardAccessibilityDelegate.java
@@ -23,6 +23,7 @@ import android.view.MotionEvent;
import com.android.inputmethod.keyboard.Key;
import com.android.inputmethod.keyboard.KeyDetector;
import com.android.inputmethod.keyboard.MoreKeysKeyboardView;
+import com.android.inputmethod.keyboard.PointerTracker;
/**
* This class represents a delegate that can be registered in {@link MoreKeysKeyboardView} to
@@ -102,11 +103,15 @@ public class MoreKeysKeyboardAccessibilityDelegate
// Invoke {@link MoreKeysKeyboardView#onUpEvent(int,int,int,long)} as if this hover
// exit event selects a key.
mKeyboardView.onUpEvent(x, y, pointerId, eventTime);
- mKeyboardView.dismissMoreKeysPanel();
+ // TODO: Should fix this reference. This is a hack to clear the state of
+ // {@link PointerTracker}.
+ PointerTracker.dismissAllMoreKeysPanels();
return;
}
// Close the more keys keyboard.
- mKeyboardView.dismissMoreKeysPanel();
+ // TODO: Should fix this reference. This is a hack to clear the state of
+ // {@link PointerTracker}.
+ PointerTracker.dismissAllMoreKeysPanels();
sendWindowStateChanged(mCloseAnnounceResId);
}
}