Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5496ca18 authored by Piotr Wilczyński's avatar Piotr Wilczyński
Browse files

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
parent 813da462
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment