在11之前mtk的默认亮度设置都是在
vendor/mediatek/proprietary/packages/apps/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
通过加载 def_screen_off_timeout 值来设置的
loadIntegerSetting(stmt, Settings.System.SCREEN_OFF_TIMEOUT,
R.integer.def_screen_off_timeout);
但是在11上而是在
frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java
mScreenBrightnessDefault = BrightnessSynchronizer.brightnessIntToFloat(
mContext.getResources().getInteger(com.android.internal.R.integer
.config_screenBrightnessSettingDefault),
PowerManager.BRIGHTNESS_OFF + 1, PowerManager.BRIGHTNESS_ON,
PowerManager.BRIGHTNESS_MIN, PowerManager.BRIGHTNESS_MAX);
默认亮度是通过config_screenBrightnessSettingDefault来设置的
不同的项目还可能不一样,需要看是否有设置overlay
例如
vendor/mediatek/proprietary/packages/overlay/vendor/FrameworkResOverlay/res/values/config.xml
<item name