1.将新的键盘apk push到system/app
2.修改com.android.provision包中的DdfaultActivity.java文件
private void settingLargeSysFont() {
try {
Configuration mCurConfig = new Configuration();
try {
mCurConfig.updateFrom(ActivityManagerNative.getDefault().getConfiguration());
} catch (RemoteException re) {
/* ignore */
}
int i = SystemProperties.getInt("ro.default.size",100);
mCurConfig.fontScale=(i*0.01f);
ActivityManagerNative.getDefault().updatePersistentConfiguration(mCurConfig);
} catch (RemoteException re) {
/* ignore */
}
//lsd add
//InputMethodManager mImm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
IInputMethodManager mImm = IInputMethodManager.Stub.asInterface(ServiceManager.getService("input_method"));
String temp1= "com.x2android.ArabicSKeyboard/.ArabicSoftKeyboard";
//String temp2 = "com.googlecode.tcimeforpk/.ZhuyinIME";
try{
if(isInputMethodlist(temp1))
{
mImm.setInputMethodEnabled(temp1, true);
mImm.setInputMethodAndSubtype(null ,temp1, null);
}
/*
if(isInputMethodlist(temp2))
mImm.setInputMethodEnabled(temp2, true);
*/
}
catch (RemoteException e) {
System.err.println(e.toString());
return;
}
//mImm.setInputMethodEnabled(temp, true);
//android.util.Log.d("lsd", temp);
}
本文详细介绍了如何将新键盘APK推送到system/app目录,并通过修改com.android.provision包中的DdfaultActivity.java文件来调整系统字体大小,同时实现特定输入法的启用与配置。


被折叠的 条评论
为什么被折叠?



