aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/SuggestedWords.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-10-09 12:02:13 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-09 12:02:13 +0000
commite06fe74d99c89576761194277af3c077a7f8528e (patch)
tree9caa0770068585d7dbef3e7efd06dae772d0d1f8 /java/src/com/android/inputmethod/latin/SuggestedWords.java
parentf49a1ec120ea6cd0cf989249d9bbd2b8941a2693 (diff)
parentbc18005948c3872a96bd3406e7dd2c722d60a013 (diff)
downloadlatinime-e06fe74d99c89576761194277af3c077a7f8528e.tar.gz
latinime-e06fe74d99c89576761194277af3c077a7f8528e.tar.xz
latinime-e06fe74d99c89576761194277af3c077a7f8528e.zip
am bc180059: Always show the typed word in recorrections.
* commit 'bc18005948c3872a96bd3406e7dd2c722d60a013': Always show the typed word in recorrections.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/SuggestedWords.java')
-rw-r--r--java/src/com/android/inputmethod/latin/SuggestedWords.java22
1 files changed, 0 insertions, 22 deletions
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java
index 466576465..e0c06925c 100644
--- a/java/src/com/android/inputmethod/latin/SuggestedWords.java
+++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java
@@ -413,28 +413,6 @@ public class SuggestedWords {
return isPrediction(mInputStyle);
}
- // SuggestedWords is an immutable object, as much as possible. We must not just remove
- // words from the member ArrayList as some other parties may expect the object to never change.
- // This is only ever called by recorrection at the moment, hence the ForRecorrection moniker.
- public SuggestedWords getSuggestedWordsExcludingTypedWordForRecorrection() {
- final ArrayList<SuggestedWordInfo> newSuggestions = new ArrayList<>();
- String typedWord = null;
- for (int i = 0; i < mSuggestedWordInfoList.size(); ++i) {
- final SuggestedWordInfo info = mSuggestedWordInfoList.get(i);
- if (!info.isKindOf(SuggestedWordInfo.KIND_TYPED)) {
- newSuggestions.add(info);
- } else {
- assert(null == typedWord);
- typedWord = info.mWord;
- }
- }
- // We should never autocorrect, so we say the typed word is valid. Also, in this case,
- // no auto-correction should take place hence willAutoCorrect = false.
- return new SuggestedWords(newSuggestions, null /* rawSuggestions */, typedWord,
- true /* typedWordValid */, false /* willAutoCorrect */, mIsObsoleteSuggestions,
- SuggestedWords.INPUT_STYLE_RECORRECTION, NOT_A_SEQUENCE_NUMBER);
- }
-
// Creates a new SuggestedWordInfo from the currently suggested words that removes all but the
// last word of all suggestions, separated by a space. This is necessary because when we commit
// a multiple-word suggestion, the IME only retains the last word as the composing word, and