2
0
Эх сурвалжийг харах

Android: Fixed a possible crash in keyboard hide method. It's called not from main thread so InputMethodManager can't be used directly.

Ivan Ponomarev 6 жил өмнө
parent
commit
288ff2fd08

+ 0 - 8
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) {