am 4735e1d3: Merge "Fix messages in tests"
* commit '4735e1d32a15e96c945ddcaebbda920ae75e6a86': Fix messages in testsmain
commit
c6d0077242
|
@ -233,6 +233,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
private static final int MSG_REOPEN_DICTIONARIES = 5;
|
private static final int MSG_REOPEN_DICTIONARIES = 5;
|
||||||
private static final int MSG_ON_END_BATCH_INPUT = 6;
|
private static final int MSG_ON_END_BATCH_INPUT = 6;
|
||||||
private static final int MSG_RESET_CACHES = 7;
|
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_NOT_GESTURE_INPUT = 0;
|
||||||
private static final int ARG1_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT = 1;
|
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);
|
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,
|
public void showGesturePreviewAndSuggestionStrip(final SuggestedWords suggestedWords,
|
||||||
final boolean dismissGestureFloatingPreviewText) {
|
final boolean dismissGestureFloatingPreviewText) {
|
||||||
removeMessages(MSG_SHOW_GESTURE_PREVIEW_AND_SUGGESTION_STRIP);
|
removeMessages(MSG_SHOW_GESTURE_PREVIEW_AND_SUGGESTION_STRIP);
|
||||||
|
|
|
@ -193,6 +193,7 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown() {
|
protected void tearDown() {
|
||||||
|
mLatinIME.mHandler.removeAllMessages();
|
||||||
setStringPreference(PREF_AUTO_CORRECTION_THRESHOLD, mPreviousAutoCorrectSetting,
|
setStringPreference(PREF_AUTO_CORRECTION_THRESHOLD, mPreviousAutoCorrectSetting,
|
||||||
DEFAULT_AUTO_CORRECTION_THRESHOLD);
|
DEFAULT_AUTO_CORRECTION_THRESHOLD);
|
||||||
setDebugMode(mPreviousDebugSetting);
|
setDebugMode(mPreviousDebugSetting);
|
||||||
|
|
Loading…
Reference in New Issue