mars: overlay: also set config_screenBrightnessDozeFloat
The PowerManagerService reads config_screenBrightnessDozeFloat first and later falls back to config_screenBrightnessDim if the float value is INVALID_BRIGHTNESS_IN_CONFIG [1]. The problem is that config_screenBrightnessDozeFloat is set to 0.0 by default on the frameworks side [2], so it will never be INVALID_BRIGHTNESS_IN_CONFIG. As a result, mScreenBrightnessDoze is always initialized to 0.0f if the device does not set config_screenBrightnessDozeFloat in an overlay, which then causes BRIGHTNESS_CONSTRAINT_TYPE_DOZE to always return 0.0f. To prevent other framework components from getting an incorrect doze config value, set this float in overlay as well. [1] https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-12.1.0_r10/services/core/java/com/android/server/power/PowerManagerService.java#991 [2] https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-12.1.0_r10/core/res/res/values/config.xml#1333 Change-Id: If79a05c167aff39b38e234fea906cb7bbeed6381 Signed-off-by:Chenyang Zhong <zhongcy95@gmail.com>
Loading
Please register or sign in to comment