aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-03-13 20:35:27 +0900
committerJean Chalard <jchalard@google.com>2012-03-14 13:10:12 +0900
commit8e19b1183e4925b7c396de45a5e4e7d67a7b876a (patch)
treed1ec66f5f743e927861a414b7157037787a6d5e9 /java/src
parent7b2d6a8f98b197b6ff9e7aefd5efef35fe1695af (diff)
downloadlatinime-8e19b1183e4925b7c396de45a5e4e7d67a7b876a.tar.gz
latinime-8e19b1183e4925b7c396de45a5e4e7d67a7b876a.tar.xz
latinime-8e19b1183e4925b7c396de45a5e4e7d67a7b876a.zip
Kill the last place where the Builder was being used
I had missed that one Change-Id: I9a5040a7a61e294396aa424de96a69dbb15f037a
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java12
-rw-r--r--java/src/com/android/inputmethod/latin/SuggestedWords.java23
2 files changed, 6 insertions, 29 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index ec408792c..a6d2b7a05 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1977,23 +1977,23 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
return;
}
- final SuggestedWords.Builder builder;
+ final SuggestedWords suggestedWords;
if (mCorrectionMode == Suggest.CORRECTION_FULL_BIGRAM) {
final CharSequence prevWord = EditingUtils.getThisWord(getCurrentInputConnection(),
mSettingsValues.mWordSeparators);
if (!TextUtils.isEmpty(prevWord)) {
- builder = mSuggest.getBigramPredictionWordBuilder(prevWord);
+ suggestedWords = mSuggest.getBigramPredictionWordBuilder(prevWord).build();
} else {
- builder = null;
+ suggestedWords = null;
}
} else {
- builder = null;
+ suggestedWords = null;
}
- if (null != builder && builder.size() > 0) {
+ if (null != suggestedWords && suggestedWords.size() > 0) {
// Explicitly supply an empty typed word (the no-second-arg version of
// showSuggestions will retrieve the word near the cursor, we don't want that here)
- showSuggestions(builder.build(), "");
+ showSuggestions(suggestedWords, "");
} else {
if (!isShowingPunctuationList()) setPunctuationSuggestions();
}
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java
index 03ff5de7b..0def1d419 100644
--- a/java/src/com/android/inputmethod/latin/SuggestedWords.java
+++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java
@@ -141,29 +141,6 @@ public class SuggestedWords {
mIsPunctuationSuggestions, mShouldBlockAutoCorrectionBySafetyNet,
mAllowsToBeAutoCorrected, mSuggestedWordInfoList);
}
-
- public int size() {
- return mSuggestedWordInfoList.size();
- }
-
- public CharSequence getWord(int pos) {
- return mSuggestedWordInfoList.get(pos).mWord;
- }
-
- public boolean allowsToBeAutoCorrected() {
- return mAllowsToBeAutoCorrected;
- }
-
- @Override
- public String toString() {
- // Pretty-print method to help debug
- return "SuggestedWords.Builder:"
- + " mTypedWordValid=" + mTypedWordValid
- + " mHasMinimalSuggestion=" + mHasMinimalSuggestion
- + " mIsPunctuationSuggestions=" + mIsPunctuationSuggestions
- + " mShouldBlockAutoCorrectionBySafetyNet="
- + mShouldBlockAutoCorrectionBySafetyNet;
- }
}
public static class SuggestedWordInfo {