1. frameworks/base/packages/SettingsProvider/res/values/defaults.xml
增加12 //24小时制的话改为24即可
2. frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java文件下,
在loadSystemSettings()方法中增加
loadStringSetting(stmt,Settings.System.TIME_12_24,R.string.time_12_24);
3. 【设置-》日期和时间-》使用24小时格式,修改默认为打开】
frameworks\base\core\java\android\text\format\DateFormat.java
改为
public static booleanis24HourFormat(Context context) {
String value = Settings.System.getString(context.getContentResolver(),
Settings.System.TIME_12_24);
if (value ==null) {
Settings.System.putString(context.getContentResolver(),
Settings.System.TIME_12_24,"24");
value = "24";
}
returnvalue.equals("24");
}