Fix IndexOutOfBoundsException in LatinIME.setSuggestions
bug: 4369728 Change-Id: I7f8b09ecf7fb096bdff73b2d3575ed3779ed120d
This commit is contained in:
parent
80bcf30dd6
commit
ec5ae3a1b6
1 changed files with 1 additions and 1 deletions
|
@ -179,7 +179,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
|
||||||
private void updateSuggestions() {
|
private void updateSuggestions() {
|
||||||
final SuggestedWords suggestions = mSuggestions;
|
final SuggestedWords suggestions = mSuggestions;
|
||||||
clear();
|
clear();
|
||||||
final int count = suggestions.size();
|
final int count = Math.min(mWords.size(), suggestions.size());
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
CharSequence word = suggestions.getWord(i);
|
CharSequence word = suggestions.getWord(i);
|
||||||
if (word == null) continue;
|
if (word == null) continue;
|
||||||
|
|
Loading…
Reference in a new issue