diff options
author | 2013-06-03 00:13:35 -0700 | |
---|---|---|
committer | 2013-06-03 00:13:35 -0700 | |
commit | c6b7cd3524f8df3d011632392cd3b302269d5fa1 (patch) | |
tree | a22d4282784002f3afee0a121a634caa4ad91168 /java | |
parent | 420532cc3aae2e68ce266e135178c5e0e8d88c8b (diff) | |
parent | 0e66ab743358b1ea65d93c640bf167af90b4d481 (diff) | |
download | latinime-c6b7cd3524f8df3d011632392cd3b302269d5fa1.tar.gz latinime-c6b7cd3524f8df3d011632392cd3b302269d5fa1.tar.xz latinime-c6b7cd3524f8df3d011632392cd3b302269d5fa1.zip |
am 0e66ab74: Merge "Fix ArrayIndexOutOfBoundException"
* commit '0e66ab743358b1ea65d93c640bf167af90b4d481':
Fix ArrayIndexOutOfBoundException
Diffstat (limited to 'java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java index 2f2ec3560..e4c5a06a2 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java @@ -208,6 +208,9 @@ final class SuggestionStripLayoutHelper { private CharSequence getStyledSuggestedWord(final SuggestedWords suggestedWords, final int indexInSuggestedWords) { + if (indexInSuggestedWords >= suggestedWords.size()) { + return null; + } final String word = suggestedWords.getWord(indexInSuggestedWords); final boolean isAutoCorrect = indexInSuggestedWords == 1 && suggestedWords.willAutoCorrect(); |