mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Fix potential ArrayIndexOutOfBoundsException"
This commit is contained in:
commit
530b4176c2
@ -67,7 +67,10 @@ public class MoreSuggestionsView extends KeyboardView implements MoreKeysPanel {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCodeInput(int primaryCode, int[] keyCodes, int x, int y) {
|
public void onCodeInput(int primaryCode, int[] keyCodes, int x, int y) {
|
||||||
mListener.onCustomRequest(primaryCode - MoreSuggestions.SUGGESTION_CODE_BASE);
|
final int index = primaryCode - MoreSuggestions.SUGGESTION_CODE_BASE;
|
||||||
|
if (index >= 0 && index < SuggestionsView.MAX_SUGGESTIONS) {
|
||||||
|
mListener.onCustomRequest(index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user