aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-01-28 01:45:35 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-01-28 01:45:35 -0800
commitfc12004571c4a22b087054850a558a96f9584294 (patch)
treef2658f0fe1d1c8cd147830d70fbfdd532b5d54d4
parentec725d1421123d5068693f96e22aa80d73d4edc2 (diff)
parent9214f17b862aa6b35dcda15ad14d3604e90988bb (diff)
downloadlatinime-fc12004571c4a22b087054850a558a96f9584294.tar.gz
latinime-fc12004571c4a22b087054850a558a96f9584294.tar.xz
latinime-fc12004571c4a22b087054850a558a96f9584294.zip
am 9214f17b: Merge "[IL100] Pull up a check"
* commit '9214f17b862aa6b35dcda15ad14d3604e90988bb': [IL100] Pull up a check
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java3
-rw-r--r--java/src/com/android/inputmethod/latin/SuggestedWords.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 18c22b94c..28d4360f6 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1428,8 +1428,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// TODO[IL]: Define a clean interface for this
public void showSuggestionStrip(final SuggestedWords suggestedWords) {
- showSuggestionStripWithTypedWord(suggestedWords, suggestedWords.isEmpty() ? null
- : suggestedWords.getWord(SuggestedWords.INDEX_OF_TYPED_WORD));
+ showSuggestionStripWithTypedWord(suggestedWords, suggestedWords.mTypedWord);
}
// Called from {@link SuggestionStripView} through the {@link SuggestionStripView#Listener}
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java
index bb34b7ba9..982a97a5e 100644
--- a/java/src/com/android/inputmethod/latin/SuggestedWords.java
+++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java
@@ -39,6 +39,7 @@ public final class SuggestedWords {
public static final SuggestedWords EMPTY = new SuggestedWords(
EMPTY_WORD_INFO_LIST, false, false, false, false, false);
+ public final String mTypedWord;
public final boolean mTypedWordValid;
// Note: this INCLUDES cases where the word will auto-correct to itself. A good definition
// of what this flag means would be "the top suggestion is strong enough to auto-correct",
@@ -74,6 +75,7 @@ public final class SuggestedWords {
mIsObsoleteSuggestions = isObsoleteSuggestions;
mIsPrediction = isPrediction;
mSequenceNumber = sequenceNumber;
+ mTypedWord = suggestedWordInfoList.isEmpty() ? null : getWord(INDEX_OF_TYPED_WORD);
}
public boolean isEmpty() {