1.修改默认latinime输入法地区设置:
packages/inputmethods/LatinIME/java/res/xml/method.xml
泰语:
android:subtypeId="0x1f94d5d4"
android:imeSubtypeLocale="th"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=thai,EmojiCapable"
android:isAsciiCapable="false"
/>
frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+ loadSetting(stmt, Settings.Secure.DEFAULT_INPUT_METHOD, "com.android.inputmethod.latin/.LatinIME");
+ loadSetting(stmt, Settings.Secure.ENABLED_INPUT_METHODS,"com.android.inputmethod.latin/.LatinIME;529847764;-921088104");
+ loadSetting(stmt, Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE, "529847764");
// 俄语
android:subtypeId="0x763a8752"
android:imeSubtypeLocale="ru"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="SupportTouchPositionCorrection,EmojiCapable"
android:isAsciiCapable="false"
/>
frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
2.修改wifi-direct名称
frameworks/opt/net/wifi/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
- return "Android_" + id.substring(0,4);
- }
+// return "Android_" + id.substring(0,4);
+ return Settings.Global.getString(context.getContentResolver(), Settings.Global.DEVICE_NAME); /*samjiang loged*/
+ }
3.Android 7.1.2修改默认输入法
packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+ loadStringSetting(stmt, Settings.Secure.DEFAULT_INPUT_METHOD,
+ R.string.def_input_method);
+ loadStringSetting(stmt, Settings.Secure.ENABLED_INPUT_METHODS,
+ R.string.def_enabled_input_methods);
packages/SettingsProvider/res/values/defaults.xml
+
+
+
4.修改默认字体大小
core/java/android/content/res/Configuration.java
public void setToDefaults() {
- fontScale = 1;
+ fontScale = 1; /*samjiang loged*/
+ //fontScale = 1.15f;
5.添加不进入休眠的操作
private void updatePowerStateLocked() {
+ if (SystemProperties.getBoolean("ro.platform.no.sleep", false))
+ {
+ Log.d(TAG,"system would not enter sleep!!!");
+ }
+ else
+ {
+ updateSuspendBlockerLocked(); //samjiang loged
+ }