Android9.0 添加系统默认输入法

软件基线:Android9.0

硬件平台:Mtk6771

Rom预置默认输入法的方法:

diff --git a/res/values/defaults.xml b/res/values/defaults.xml
index d65e4a2..36592ae 100644
--- a/res/values/defaults.xml
+++ b/res/values/defaults.xml
@@ -228,4 +228,7 @@
     1
     1
 
+   
+    com.iflytek.inputmethod/.LauncherActivity:com.iflytek.inputmethod/.FlyIME
+

 
diff --git a/src/com/android/providers/settings/DatabaseHelper.java b/src/com/android/providers/settings/DatabaseHelper.java
index 7f5cf72..ad52abd 100644
--- a/src/com/android/providers/settings/DatabaseHelper.java
+++ b/src/com/android/providers/settings/DatabaseHelper.java
@@ -2396,6 +2396,9 @@ class DatabaseHelper extends SQLiteOpenHelper {
             stmt = db.compileStatement("INSERT OR IGNORE INTO secure(name,value)"
                     + " VALUES(?,?);");
 
+            loadStringSetting(stmt, Secure.ENABLED_INPUT_METHODS,
+                    R.string.config_default_input_method);
+

             /// M: Modify for operator LOCATION_PROVIDERS_ALLOWED customization.
             loadSetting(stmt, Settings.Secure.LOCATION_PROVIDERS_ALLOWED,
                     mUtils.getStringValue(Settings.Secure.LOCATION_PROVIDERS_ALLOWED,

 

增量编译系统代码,刷机验证~~~~~~~~

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(android,Android9.0,输入法,inputmethod,预置输入法,SettingProvider)