Created
April 14, 2016 06:08
-
-
Save chenshengfa0803/fcd174482f3be49f78336e1255d9006d to your computer and use it in GitHub Desktop.
test gist by shfa.chan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static InputMethodManager getInstance() { | |
synchronized (InputMethodManager.class) { | |
if (sInstance == null) { | |
IBinder b = ServiceManager.getService(Context.INPUT_METHOD_SERVICE); | |
IInputMethodManager service = IInputMethodManager.Stub.asInterface(b); | |
sInstance = new InputMethodManager(service, Looper.getMainLooper()); | |
} | |
return sInstance; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment