From fa4c59f9b6663e5de08692f853e968603dfc10e9 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Tue, 1 Jul 2014 18:07:42 +0900 Subject: Fix a unit test When switching languages, we need to wait until the dictionary is loaded to compute suggestions. Change-Id: I7c32a900b297cd6302bfdc020842581315f3007f --- java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java') diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index b9a87c921..0c7d22378 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -362,7 +362,8 @@ public final class InputLogic { // The cursor has been moved : we now accept to perform recapitalization mRecapitalizeStatus.enable(); // We moved the cursor. If we are touching a word, we need to resume suggestion. - mLatinIME.mHandler.postResumeSuggestions(false /* shouldIncludeResumedWordInSuggestions */); + mLatinIME.mHandler.postResumeSuggestions(false /* shouldIncludeResumedWordInSuggestions */, + true /* shouldDelay */); // Stop the last recapitalization, if started. mRecapitalizeStatus.stop(); return true; @@ -1945,7 +1946,8 @@ public final class InputLogic { if (tryResumeSuggestions) { // This is triggered when starting input anew, so we want to include the resumed // word in suggestions. - handler.postResumeSuggestions(true /* shouldIncludeResumedWordInSuggestions */); + handler.postResumeSuggestions(true /* shouldIncludeResumedWordInSuggestions */, + true /* shouldDelay */); } return true; } -- cgit v1.2.3-83-g751a