默认开启“显示输入法”开关
1.先在packages/SettingsProvider/res/values/defaults.xml中增加默认配置
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 863f702…6770186 100755
— a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -230,4 +230,6 @@
1500
<string name="def_time_24">24</string>
- 1
2.在/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java 中的loadSecureSettings(SQLiteDatabase db)方法中加入新字段的添加代码
chenguo@ubuntu:~/work/RK3229/hmd-rk3229/rk3229_5.1/frameworks/base$ git diff packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvi
index 3c835d6…ab85b04 100755
— a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -2521,6 +2521,10 @@ public class DatabaseHelper extends SQLiteOpenHelper {
loadIntegerSetting(stmt, Settings.Secure.SLEEP_TIMEOUT,
R.integer.def_sleep_timeout);
-
//add by cg for Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD
-
loadIntegerSetting(stmt, Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD,
-
R.integer.def_show_ime_with_hard_keyboard);
-
} finally { if (stmt != null) stmt.close(); }
(END)