+++ /dev/null
-package org.openintents.filemanager.compatibility;\r
-\r
-import android.content.Context;\r
-import android.os.IBinder;\r
-import android.view.inputmethod.InputMethodManager;\r
-\r
-/*\r
- * Wraper class for closing the software keyboard, which appeared in API 3.\r
- */\r
-\r
-public class SoftKeyboard {\r
- /* class initialization fails when this throws an exception */\r
- static {\r
- try {\r
- Class.forName("android.view.inputmethod.InputMethodManager");\r
- } catch (Exception ex) {\r
- throw new RuntimeException(ex);\r
- }\r
- }\r
-\r
- /* calling here forces class initialization */\r
- public static void checkAvailable() {}\r
- \r
- private InputMethodManager inputMethodManager;\r
- \r
- public SoftKeyboard(Context ctx){\r
- inputMethodManager = (InputMethodManager) ctx.getSystemService(\r
- Context.INPUT_METHOD_SERVICE);\r
- }\r
- \r
- public boolean hideSoftInputFromWindow(IBinder windowToken, int flags){\r
- return inputMethodManager.hideSoftInputFromWindow(windowToken, flags);\r
- }\r
-}
\ No newline at end of file