From 288ff2fd0820c67b52526b90ee2403cbafad6503 Mon Sep 17 00:00:00 2001 From: Ivan Ponomarev Date: Wed, 27 Feb 2019 16:59:50 +0300 Subject: [PATCH] Android: Fixed a possible crash in keyboard hide method. It's called not from main thread so InputMethodManager can't be used directly. --- .../android/java/src/org/godotengine/godot/GodotIO.java | 8 -------- 1 file changed, 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 8cee20e435c..85bba8bb4c5 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) {