0%

Android系统源码定制修改

修改系统默认时间显示为24小时制

目前只针对安卓7.1.1进行了修改测试
源码路径:
frameworks/base/packages/SettingsProvider/res/values/defaults.xml
添加:

1
<string name="def_time_12_24" translatable="false">24</string>

源码路径:
frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
添加:

1
2
3
4
5
private void loadSystemSettings(SQLiteDatabase db) {
...
loadStringSetting(stmt, Settings.System.TIME_12_24, R.string.def_time_12_24);
...
}

去除“从顶部向下滑动即可退出全屏模式”

framework/base/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
private final class H extends Handler {
private static final int SHOW = 1;
private static final int HIDE = 2;

@Override
public void handleMessage(Message msg) {
switch(msg.what) {
case SHOW:
+ //handleShow();
break;
case HIDE:
+ //handleHide();
break;
}
}
}