Adjust float-to-int brightness conversion to be purely in float.

By converting to int and back as part of the final steps in sending the
brightness to the HAL, we undo the whole benefit of having floating
point brightness.  This change alters the conversion to an int-range
without using the int-primitives. This helps maintain the existing
precision.

Bug: 155875691
Test: Manually verify with logs that the float value isn't altered
before going to the HAL (it previously was).
Test: atest CtsDisplayTestCases
Test: atest DisplayManagerServiceTests
Change-Id: Ibf2f8d00c575d440c3fe437b32c0613bcd471c2a

Change-Id: Ie9569efb7b951c15ffcf2306ff9f864f858df8b1
2 files changed