mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix a potential IllegalArgumentException caught by monkeys. #2176776
For some reason the key code is outside the code point range. Adding a safeguard to deal with possible out of range key codes.
This commit is contained in:
parent
b3f6d58b6e
commit
eef539c3f2
@ -693,6 +693,10 @@ public class LatinIME extends InputMethodService
|
|||||||
}
|
}
|
||||||
if (mInputView.isShifted()) {
|
if (mInputView.isShifted()) {
|
||||||
// TODO: This doesn't work with ß, need to fix it in the next release.
|
// TODO: This doesn't work with ß, need to fix it in the next release.
|
||||||
|
if (keyCodes == null || keyCodes[0] < Character.MIN_CODE_POINT
|
||||||
|
|| keyCodes[0] > Character.MAX_CODE_POINT) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
primaryCode = new String(keyCodes, 0, 1).toUpperCase().charAt(0);
|
primaryCode = new String(keyCodes, 0, 1).toUpperCase().charAt(0);
|
||||||
}
|
}
|
||||||
if (mPredicting) {
|
if (mPredicting) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user