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
2 files changed