mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Fix potential null in android text entry system.
(cherry picked from commit f8699d93f6)
This commit is contained in:
parent
27df8b93aa
commit
f3907e2fe0
1 changed files with 6 additions and 5 deletions
|
|
@ -124,13 +124,14 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
|
|||
public boolean onEditorAction(final TextView pTextView, final int pActionID, final KeyEvent pKeyEvent) {
|
||||
if (mEdit == pTextView && isFullScreenEdit() && pKeyEvent != null) {
|
||||
final String characters = pKeyEvent.getCharacters();
|
||||
|
||||
if (characters != null) {
|
||||
for (int i = 0; i < characters.length(); i++) {
|
||||
final int character = characters.codePointAt(i);
|
||||
GodotLib.key(0, character, 0, true);
|
||||
GodotLib.key(0, character, 0, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pActionID == EditorInfo.IME_ACTION_DONE) {
|
||||
// Enter key has been pressed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue