更改默认输入法:
platform/frameworks/base/packages/SettingsProvider/res/values/defaults.xm
调试输入法,在Launcher的onCreate里添加:
InputMethodManager mImm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
List mImis = mImm.getInputMethodList();
final int N = (mImis == null) ? 0 : mImis.size();
for (int i = 0; i < N; i++) {
final InputMethodInfo imi = mImis.get(i);
Log.d(TAG, i + " IME's ID:" + imi.getId());
Log.d(TAG, i + " IME's PackageName:" + imi.getPackageName());
Log.d(TAG, i + " IME's ServiceName:" + imi.getServiceName());
}
String currentInputMethodId = Settings.Secure.getString(getContentResolver(),
Settings.Secure.DEFAULT_INPUT_METHOD);
Log.d(TAG, "Settings.Secure.DEFAULT_INPUT_METHOD is:" + currentInputMethodId);
网友评论