Skip to content
Snippets Groups Projects
Commit 72ac390c authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Fix ArrayIndexOutOfBoundException

Change-Id: I243fc4965365680615eed834efe9ae0240e7f2a8
parent 0bf8c0bf
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment