diff options
author | Ivan Ponomarev <ivantrue@gmail.com> | 2019-02-27 16:59:50 +0300 |
---|---|---|
committer | Ivan Ponomarev <ivantrue@gmail.com> | 2019-02-27 16:59:50 +0300 |
commit | 288ff2fd0820c67b52526b90ee2403cbafad6503 (patch) | |
tree | db09eac62062a0cc4432d5bb18c01c9d84848b08 /platform/android/java/src | |
parent | 36de6c1e3c08a30a7579148ee5d2f8ed8021de42 (diff) |
Android: Fixed a possible crash in keyboard hide method. It's called not from main thread so InputMethodManager can't be used directly.
Diffstat (limited to 'platform/android/java/src')
-rw-r--r-- | platform/android/java/src/org/godotengine/godot/GodotIO.java | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/platform/android/java/src/org/godotengine/godot/GodotIO.java b/platform/android/java/src/org/godotengine/godot/GodotIO.java index 8cee20e435..85bba8bb4c 100644 --- a/platform/android/java/src/org/godotengine/godot/GodotIO.java +++ b/platform/android/java/src/org/godotengine/godot/GodotIO.java @@ -516,14 +516,6 @@ public class GodotIO { public void hideKeyboard() { if (edit != null) edit.hideKeyboard(); - - InputMethodManager inputMgr = (InputMethodManager)activity.getSystemService(Context.INPUT_METHOD_SERVICE); - View v = activity.getCurrentFocus(); - if (v != null) { - inputMgr.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); - } else { - inputMgr.hideSoftInputFromWindow(new View(activity).getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); - } }; public void setScreenOrientation(int p_orientation) { |