Make the brightness int scale match the slider
The brightness scale 0-255 will now match the slider, i.e. setting brighthess to 0.23 * 255 will set it to 23% on the slider. This will work regardless of the brightness limits (e.g. HBM) - if HBM is on, 255 will still be the max value on the slider, so the max value allowed in HBM mode. This only affects the int scale of the brightness setting. The brightness int values in config files will remain unchanged. This is guarded with a feature flag. This previously broke a test (ag/24308775, b/302310558) but it's fixed in this CL because the right value is passed to mBatteryStats.noteScreenBrightness in DPC. Bug: 183655602 Test: atest com.android.server.display Test: atest android.display.cts Test: atest CtsStatsdAtomHostTestCases:android.cts.statsdatom.statsd.UidAtomTests#testScreenBrightness -- --abi x86_64 Change-Id: Ie808864859532162df41727c24d0061ff0bb2984
Loading
Please register or sign in to comment