aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-11-27 08:44:30 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-11-27 08:44:31 +0000
commit4735e1d32a15e96c945ddcaebbda920ae75e6a86 (patch)
tree7a9a61e02226c138d7f579337f59171b53be550d /java/src
parent05e099d77d99e9bcf2039330c6d816640acfce03 (diff)
parentdfc5aade2d9e33c48cd0a6c89eadd2fcbf69c52f (diff)
downloadlatinime-4735e1d32a15e96c945ddcaebbda920ae75e6a86.tar.gz
latinime-4735e1d32a15e96c945ddcaebbda920ae75e6a86.tar.xz
latinime-4735e1d32a15e96c945ddcaebbda920ae75e6a86.zip
Merge "Fix messages in tests"
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 59d0e9fbd..2e5bb19d6 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -233,6 +233,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private static final int MSG_REOPEN_DICTIONARIES = 5;
private static final int MSG_ON_END_BATCH_INPUT = 6;
private static final int MSG_RESET_CACHES = 7;
+ // Update this when adding new messages
+ private static final int MSG_LAST = MSG_RESET_CACHES;
private static final int ARG1_NOT_GESTURE_INPUT = 0;
private static final int ARG1_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT = 1;
@@ -344,6 +346,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
removeMessages(MSG_UPDATE_SHIFT_STATE);
}
+ @UsedForTesting
+ public void removeAllMessages() {
+ for (int i = 0; i <= MSG_LAST; ++i) {
+ removeMessages(i);
+ }
+ }
+
public void showGesturePreviewAndSuggestionStrip(final SuggestedWords suggestedWords,
final boolean dismissGestureFloatingPreviewText) {
removeMessages(MSG_SHOW_GESTURE_PREVIEW_AND_SUGGESTION_STRIP);