Ported: Fix null in android text entry system.

- jasonwinterpixel
cec8e09948
This commit is contained in:
Relintai 2023-04-20 23:46:17 +02:00
parent dd5ad408e8
commit e32e0af40f

View File

@ -125,12 +125,14 @@ public class PandemoniumTextInputWrapper implements TextWatcher, OnEditorActionL
if (this.mEdit == pTextView && this.isFullScreenEdit() && pKeyEvent != null) { if (this.mEdit == pTextView && this.isFullScreenEdit() && pKeyEvent != null) {
final String characters = pKeyEvent.getCharacters(); final String characters = pKeyEvent.getCharacters();
if (characters != null) {
for (int i = 0; i < characters.length(); i++) { for (int i = 0; i < characters.length(); i++) {
final int ch = characters.codePointAt(i); final int ch = characters.codePointAt(i);
PandemoniumLib.key(ch, 0, ch, true); PandemoniumLib.key(ch, 0, ch, true);
PandemoniumLib.key(ch, 0, ch, false); PandemoniumLib.key(ch, 0, ch, false);
} }
} }
}
if (pActionID == EditorInfo.IME_ACTION_DONE) { if (pActionID == EditorInfo.IME_ACTION_DONE) {
// Enter key has been pressed // Enter key has been pressed