Commit Graph

18 Commits

Author SHA1 Message Date
Jeff Brown
829c79961c Fix manual brightness adjustment.
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
2012-04-30 16:19:46 -07:00
Dianne Hackborn
704cc2f600 Deal correctly with an unset brightness adjustment.
Change-Id: I191051989bad68f31210bbc717fbabd59d4585a1
2012-04-23 18:22:13 -07:00
Dianne Hackborn
9907f6b274 When auto-brightness is on, you can now adjust its brightness.
Change-Id: Ie152def12cf7befd9c15a19f9975c207cbb5c541
2012-01-23 10:22:08 -08:00
Todd Poynor
a94320e332 Settings use minimum manual brightness from config
Remove use of deprecated android.os.Power.BRIGHTNESS_DIM (20) + 10.

Change-Id: I24aff7d7fc93b4b67dedb1047bbbd4dbe3fae382
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-10-25 17:14:33 -07:00
John Reck
c2ad2e4ce5 SeekBarPreference -> SeekBarDialogPreference
Change-Id: Ie1fba2633806a50b5282728dce447be2162ad67f
2011-06-15 16:49:16 -07:00
Amith Yamasani
26a1f898e0 Track changes to brightness and orientation lock in Settings.
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
2011-02-28 17:27:04 -08:00
Amith Yamasani
a80cf2cbf5 Save and restore brightness on orientation changes.
Bug: 2524213
2011-01-03 15:15:41 -08:00
Amith Yamasani
1d5c898a3d Fix for 2284833 : Remove big brightness icon and make it a small one on the title bar. 2010-02-26 14:09:37 -08:00
Mike Lockwood
9878e86c45 Avoid setting screen brightness when initializing brightness dialog in automatic mode.
Fixes bug b/2226257 (Brightness wonky)

Change-Id: Ibe1d06fc907960dcb6a70faa92e6c3a562016865
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-10-30 09:43:02 -04:00
Mike Lockwood
53dcdeeb85 Don't restore old brightness when cancelling brightness dialog in automatic mode.
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>
2009-10-28 18:33:04 -04:00
Mike Lockwood
cdf42466bf Remove PowerManager.setAutoBrightness()
We will use the System.SCREEN_BRIGHTNESS_MODE Settings value instead.

Change-Id: I1850549f513e3541b5761aae28ebc615410377de
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-10-14 21:19:04 -07:00
Mike Lockwood
65f49474d6 Restore backlight brightness after restoring auto ALS mode.
Fixes b/2121632

Change-Id: I14228a4fd1d599de1e5fdbb3c8b4b3c02a1460ac
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-16 06:22:19 -04:00
Mike Lockwood
cd03f5320d Move backlight brightness from HardwareService to PowerManager
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>
2009-09-15 15:24:14 -04:00
Dan Murphy
a096888f3c apps/settings: Add auto/manual brightness control to Brightness settings
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>
2009-09-14 21:42:56 -04:00
The Android Open Source Project
e6dd1fa185 auto import from //branches/cupcake_rel/...@140373 2009-03-18 17:39:48 -07:00
The Android Open Source Project
afc4ab2ffb auto import from //depot/cupcake/@135843 2009-03-03 19:32:34 -08:00
The Android Open Source Project
4e14e5ccbf auto import from //depot/cupcake/@135843 2009-03-03 18:28:52 -08:00
The Android Open Source Project
de2d9f5f10 Initial Contribution 2008-10-21 07:00:00 -07:00