aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-03-14 13:09:05 +0900
committerJean Chalard <jchalard@google.com>2012-03-14 14:19:24 +0900
commit5b0643f50d8c363296360f3ceaf32f7edc157141 (patch)
tree207d3bbedfda998970eaf994337fd4212f9f0c6e /java/src/com/android/inputmethod/latin/LatinIME.java
parentd42b0238f9f7cedf9b991e55f528662029b63b88 (diff)
downloadlatinime-5b0643f50d8c363296360f3ceaf32f7edc157141.tar.gz
latinime-5b0643f50d8c363296360f3ceaf32f7edc157141.tar.xz
latinime-5b0643f50d8c363296360f3ceaf32f7edc157141.zip
Re-sequence the last calls to build()
Change-Id: If77ee5aa9483d3ca03c52812f31665dee6468e99
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 08d54c6ff..d0f94bb6a 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1768,9 +1768,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
final CharSequence typedWord = mWordComposer.getTypedWord();
// getSuggestedWordBuilder handles gracefully a null value of prevWord
- final SuggestedWords.Builder builder = mSuggest.getSuggestedWordBuilder(mWordComposer,
+ final SuggestedWords suggestedWords = mSuggest.getSuggestedWords(mWordComposer,
prevWord, mKeyboardSwitcher.getKeyboard().getProximityInfo(), mCorrectionMode);
- final SuggestedWords suggestions = builder.build();
// Basically, we update the suggestion strip only when suggestion count > 1. However,
// there is an exception: We update the suggestion strip whenever typed word's length
@@ -1778,10 +1777,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// in most cases, suggestion count is 1 when typed word's length is 1, but we do always
// need to clear the previous state when the user starts typing a word (i.e. typed word's
// length == 1).
- if (suggestions.size() > 1 || typedWord.length() == 1
- || !suggestions.mAllowsToBeAutoCorrected
+ if (suggestedWords.size() > 1 || typedWord.length() == 1
+ || !suggestedWords.mAllowsToBeAutoCorrected
|| mSuggestionsView.isShowingAddToDictionaryHint()) {
- showSuggestions(suggestions, typedWord);
+ showSuggestions(suggestedWords, typedWord);
} else {
SuggestedWords previousSuggestions = mSuggestionsView.getSuggestions();
if (previousSuggestions == mSettingsValues.mSuggestPuncList) {
@@ -1982,7 +1981,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
final CharSequence prevWord = EditingUtils.getThisWord(getCurrentInputConnection(),
mSettingsValues.mWordSeparators);
if (!TextUtils.isEmpty(prevWord)) {
- suggestedWords = mSuggest.getBigramPredictionWordBuilder(prevWord).build();
+ suggestedWords = mSuggest.getBigramPredictions(prevWord);
} else {
suggestedWords = null;
}