getBrightness() was calculating the brightness ratio the wrong
way, resulting in brightness fractions always greater than 1.0
being produced (maximum brightness).
Bug: 6377115
Change-Id: Ia2fbae505ffdc382005722d25301bfb689b585fb
Bug: 3491814
Bug: 3482859
Bug: 3497535
Since the system bar can now change brightness and orientation lock, Settings needs to listen
to changes to those settings and reflect in the UI.
Also fix a problem with restoring state on cancel when the brightness dialog is invoked a
second time.
Change-Id: I3ada6e77df9a6b013a16061877fcb6b55c94a903
Fixes a problem that could result in the backlight getting set to a bogus brightness
level if you open the dialog and cancel when in automatic mode.
Bug b/2015734
Change-Id: I302697e4ebd37afcdbfdd74ba0b1cc9be27ee40b
Signed-off-by: Mike Lockwood <lockwood@android.com>
We will use the System.SCREEN_BRIGHTNESS_MODE Settings value instead.
Change-Id: I1850549f513e3541b5761aae28ebc615410377de
Signed-off-by: Mike Lockwood <lockwood@android.com>
to prevent apps from changing the hardware behind its back.
Fixes b/2041941 Lock screen flashes the screen very bright before dimming
Change-Id: Ic4faa008357fd3d74225ba90f05801c5127fd8c0
Signed-off-by: Mike Lockwood <lockwood@android.com>
Add changes to have the ability to turn on and off the
automatic light sensing for the device. This is fully configurable
and is by default not present. Vendors should override the ALS setting
to enable the automatic lighting controls.
These changes will add a check box to the Brightness settings menu to give control
to the user to allow the device's display lighting to be controlled via the slide bar
or the auto lighting system.
If the user selects auto then the slide bar will become invisible. Manual mode
will present the slide bar to the user.
Change-Id: I512c9d5dd72ddd831b33eb8fcd4680e2fc7f786e
Signed-off-by: Dan Murphy <D.Murphy@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>