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

Skip to content
Commit 3c6b51a9 authored by Fiona Campbell's avatar Fiona Campbell
Browse files

Convert BrightnessUtils to use brightness as float

convertGammaToLinear needed to be constrained to 0-12, as sometimes ret
variable was 12.000001.

The first parameter for gammaToLinear_minValue_shouldReturnMin has been
changed - initally it used 1 (MIN_INT) but it should have been using 0
(GAMMA_SPACE_MIN). Since the function rounded the value at the end, the
result ended up the same.

The original functions cannot be removed yet since Car uses these methods.

Bug: 150671605

Test: m -j99 RunSettingsLibRoboTests ROBOTEST_FILTER="com.android.settingslib.display.BrightnessUtilsTest"

Change-Id: I4bba2ca0785f94597590c8f4bb3a7a8a834d6c83
parent 3443ba8d
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