diff options
author | 2014-06-24 09:40:39 +0000 | |
---|---|---|
committer | 2014-06-24 09:40:39 +0000 | |
commit | b6833ba585de4de1683d325f9e58c5dbe05e0ca2 (patch) | |
tree | 0c3ef9c62dc2cf8b969590c522826af9c806e142 /java/src | |
parent | 68c90f30aefb0711c768ae65f08a4f13d0f4c6ff (diff) | |
parent | 53f23234e31c9a569c7b30262cdf6bd123756aa9 (diff) | |
download | latinime-b6833ba585de4de1683d325f9e58c5dbe05e0ca2.tar.gz latinime-b6833ba585de4de1683d325f9e58c5dbe05e0ca2.tar.xz latinime-b6833ba585de4de1683d325f9e58c5dbe05e0ca2.zip |
am 53f23234: Merge "[CS3.5] Small correction"
* commit '53f23234e31c9a569c7b30262cdf6bd123756aa9':
[CS3.5] Small correction
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/SuggestedWords.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index 8e78e970f..f22af7991 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -336,16 +336,17 @@ public class SuggestedWords { return; } if (!TextUtils.isEmpty(typedWord)) { - removeSuggestedWordInfoFrom(typedWord, candidates, 0); + removeSuggestedWordInfoFrom(typedWord, candidates, -1 /* startIndexExclusive */); } for (int i = 0; i < candidates.size(); ++i) { - removeSuggestedWordInfoFrom(candidates.get(i).mWord, candidates, i); + removeSuggestedWordInfoFrom(candidates.get(i).mWord, candidates, + i /* startIndexExclusive */); } } private static void removeSuggestedWordInfoFrom(final String word, - final ArrayList<SuggestedWordInfo> candidates, final int startIndex) { - for (int i = startIndex + 1; i < candidates.size(); ++i) { + final ArrayList<SuggestedWordInfo> candidates, final int startIndexExclusive) { + for (int i = startIndexExclusive + 1; i < candidates.size(); ++i) { final SuggestedWordInfo previous = candidates.get(i); if (word.equals(previous.mWord)) { candidates.remove(i); |