Merge pull request #75992 from jasonwinterpixel/bugfix/3.x-fix-android-null

[3.x] Fix null in android text entry system.
This commit is contained in:
Rémi Verschelde 2023-04-17 17:25:32 +02:00
commit d02656f91f
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 6 additions and 5 deletions

View File

@ -124,11 +124,12 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
public boolean onEditorAction(final TextView pTextView, final int pActionID, final KeyEvent pKeyEvent) {
if (this.mEdit == pTextView && this.isFullScreenEdit() && pKeyEvent != null) {
final String characters = pKeyEvent.getCharacters();
for (int i = 0; i < characters.length(); i++) {
final int ch = characters.codePointAt(i);
GodotLib.key(ch, 0, ch, true);
GodotLib.key(ch, 0, ch, false);
if (characters != null) {
for (int i = 0; i < characters.length(); i++) {
final int ch = characters.codePointAt(i);
GodotLib.key(ch, 0, ch, true);
GodotLib.key(ch, 0, ch, false);
}
}
}