mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Fix IndexOutOfBound exception"
This commit is contained in:
commit
9f9de3570d
@ -245,7 +245,12 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
|
|||||||
mTexts.clear();
|
mTexts.clear();
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
final CharSequence suggestion = suggestions.getWord(i);
|
final CharSequence suggestion = suggestions.getWord(i);
|
||||||
if (suggestion == null) continue;
|
if (suggestion == null) {
|
||||||
|
// Skip an empty suggestion, but we need to add a place-holder for it in order
|
||||||
|
// to avoid an exception in the loop in updateSuggestions().
|
||||||
|
mTexts.add("");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
final boolean isAutoCorrect = suggestions.mHasMinimalSuggestion
|
final boolean isAutoCorrect = suggestions.mHasMinimalSuggestion
|
||||||
&& ((i == 1 && !suggestions.mTypedWordValid)
|
&& ((i == 1 && !suggestions.mTypedWordValid)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user