diff --git a/java/src/com/android/inputmethod/latin/DictionaryCollection.java b/java/src/com/android/inputmethod/latin/DictionaryCollection.java index 3fcb6ed55..5e7de3e6b 100644 --- a/java/src/com/android/inputmethod/latin/DictionaryCollection.java +++ b/java/src/com/android/inputmethod/latin/DictionaryCollection.java @@ -54,8 +54,8 @@ public class DictionaryCollection extends Dictionary { @Override public boolean isValidWord(CharSequence word) { - for (final Dictionary dict : mDictionaries) - if (dict.isValidWord(word)) return true; + for (int i = mDictionaries.size() - 1; i >= 0; --i) + if (mDictionaries.get(i).isValidWord(word)) return true; return false; }