Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec5ae3a1 authored by Ken Wakasa's avatar Ken Wakasa
Browse files

Fix IndexOutOfBoundsException in LatinIME.setSuggestions

bug: 4369728
Change-Id: I7f8b09ecf7fb096bdff73b2d3575ed3779ed120d
parent 80bcf30d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
    private void updateSuggestions() {
        final SuggestedWords suggestions = mSuggestions;
        clear();
        final int count = suggestions.size();
        final int count = Math.min(mWords.size(), suggestions.size());
        for (int i = 0; i < count; i++) {
            CharSequence word = suggestions.getWord(i);
            if (word == null) continue;