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

Commit 530b4176 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Fix potential ArrayIndexOutOfBoundsException"

parents 2cb36637 8332fd0b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -67,7 +67,10 @@ public class MoreSuggestionsView extends KeyboardView implements MoreKeysPanel {

        @Override
        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