aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-03-13 18:21:35 +0900
committerJean Chalard <jchalard@google.com>2012-03-13 18:22:49 +0900
commit4ee186920e642ae8ebe0b6c97dfdceb0ad2fdeef (patch)
treea0e674f1a8ae597e5306e7a1a83e6932f8c936ce /java/src/com/android/inputmethod/latin/LatinIME.java
parentb8753eb31c444cd0a1f180ea4caec914693fa703 (diff)
downloadlatinime-4ee186920e642ae8ebe0b6c97dfdceb0ad2fdeef.tar.gz
latinime-4ee186920e642ae8ebe0b6c97dfdceb0ad2fdeef.tar.xz
latinime-4ee186920e642ae8ebe0b6c97dfdceb0ad2fdeef.zip
Remove a method that causes annoying side-effects.
...and replace by a call to a central method. Change-Id: I93d0a2c2e99963a5b69923d1062d0e01853216b6
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index dc5bd2efc..39cbfa7a0 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -72,6 +72,7 @@ import com.android.inputmethod.latin.suggestions.SuggestionsView;
import java.io.FileDescriptor;
import java.io.PrintWriter;
+import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
@@ -1782,8 +1783,14 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
if (previousSuggestions == mSettingsValues.mSuggestPuncList) {
previousSuggestions = SuggestedWords.EMPTY;
}
+ final ArrayList<SuggestedWords.SuggestedWordInfo> typedWordAndPreviousSuggestions =
+ SuggestedWords.Builder.getTypedWordAndPreviousSuggestions(
+ typedWord, previousSuggestions);
final SuggestedWords.Builder obsoleteSuggestionsBuilder = new SuggestedWords.Builder()
- .addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions);
+ .addWords(typedWordAndPreviousSuggestions)
+ .setTypedWordValid(false)
+ .setHasMinimalSuggestion(false);
+
showSuggestions(obsoleteSuggestionsBuilder.build(), typedWord);
}
}