Fix null in android text entry system.
(cherry picked from commit cec8e09948
)
This commit is contained in:
parent
1297045a8c
commit
42f9208593
@ -128,11 +128,12 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
|
|||||||
public boolean onEditorAction(final TextView pTextView, final int pActionID, final KeyEvent pKeyEvent) {
|
public boolean onEditorAction(final TextView pTextView, final int pActionID, final KeyEvent pKeyEvent) {
|
||||||
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);
|
||||||
GodotLib.key(0, 0, ch, true);
|
GodotLib.key(0, 0, ch, true);
|
||||||
GodotLib.key(0, 0, ch, false);
|
GodotLib.key(0, 0, ch, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user