1、默认音量
device/mediatek/system/common/system.prop
ro.config.vc_call_vol_steps=7
ro.config.vc_call_vol_default=6
ro.config.media_vol_steps=15
ro.config.media_vol_default=15
ro.config.system_vol_steps=15
ro.config.system_vol_default=15
frameworks/base/services/core/java/com/android/server/audio/AudioService.java
int defaultAlarmVolume = SystemProperties.getInt("ro.config.alarm_vol_default", -1);
if (defaultAlarmVolume != -1 && defaultAlarmVolume <= MAX_STREAM_VOLUME[AudioSystem.STREAM_ALARM]) {
AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_ALARM] = defaultAlarmVolume;
}
int defaultRingVolume = SystemProperties.getInt("ro.config.ring_vol_default", -1);
if (defaultRingVolume != -1 && defaultRingVolume <= MAX_STREAM_VOLUME[AudioSystem.STREAM_RING]) {
AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_RING] = defaultRingVolume;
}
?build/make/target/product/core_base.mk
PRODUCT_PROPERTY_OVERRIDES += \
ro.config.voice_call_vol_def=7 \
ro.config.system_vol_def=15 \
ro.config.media_vol_default=12 \
ro.config.alarm_vol_default=12 \
ro.config.ring_vol_default=12
2、默认字体
修改数据库中的默认设置值:
vendor/mediatek/proprietary/packages/apps/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
if ("1".equals(android.os.SystemProperties.get("ro.def_small_font", "0"))) {
loadSetting(stmt, Settings.System.FONT_SCALE, 0.85f);
}
更新UI图标显示:
vendor/mediatek/proprietary/packages/apps/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
if ("1".equals(android.os.SystemProperties.get("ro.def_small_font", "0"))) {
return Settings.System.getFloat(mContext.getContentResolver(), name, 0.85f) != 0.85f;
}
3、默认亮度
vendor/mediatek/proprietary/packages/apps/SettingsProvider/res/values/defaults.xml
<integer name="def_screen_brightness">94</integer>
参考链接:https://www.cnblogs.com/ssy197/p/14348552.html
|