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

Remove precision loss on brightness slider.

Replacing this check with an equivalent float one allows all backlight values to be used. Previously, each slider change was being ignored if the int values were equivalent. Int values have a range of 1 to 255, however, the hardware can have more precision than this, so its more precise to do the comparison using floats, not ints.

Bug: 157454239

Test: Manual, `ROBOTEST_FILTER=BrightnessLevelPreferenceControllerTest m -j RunSettingsRoboTests`, `cat /sys/class/backlight/panel0-backlight/brightness`.

Change-Id: I15eab92b465652fc0024ed92045cc731492d88ba
parent 829ac140
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