Commit Graph

31 Commits

Author SHA1 Message Date
Jason Chiu
0bd014c497 [Safer intents] Settings misc
To avoid implicit intents, make intents launch explicitly.

Test: build
Bug: 323061508
Change-Id: Ie19cbceb89842a75a180898abcce81b63c18d46c
2024-03-29 04:22:45 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Alan Viverette
97e5aac732 Use activity for brightness dialog
BUG: 15512088
Change-Id: Ibe38525b78d06e97cdf7e6369ca8179ab63e59d7
2014-07-14 15:07:34 -07:00
Michael Wright
e509cba855 Update Settings app to use new brightness dialog
Bug: 7304957
Change-Id: I3894f6fc9ae1aef92bff328006601af518111983
2013-02-20 11:03:38 -08:00
Benn Porscke
106cf669c1 Correct check box visibility in Display / Brightness
The check box for "Automatic brightness" should not be visible in
Brightness screen if the product configuration
config_automatic_brightness_available in config.xml is set to false.

Change-Id: I0d81137723d0eacd97aa88bf08b69e12dd4d73fa
Signed-off-by: Benn Porscke <benn.porscke@stericsson.com>
2012-12-18 10:38:41 +01:00
Jeff Brown
eda43176e3 Enable auto-brightness adjustment feature with system prop.
This feature is experimental and disabled by default.

Change-Id: I9c3c77d6d207ceec65e0babc7915db8d439d5da2
2012-09-08 15:12:19 -07:00
Jeff Brown
9674b32324 Add a flag to control auto-brightness adjustment.
The feature is still disabled, it's just disabled using
a flag now.

Change-Id: I43ceaa5ab9b7252e3882c8b2d48c9844afb806c3
2012-08-21 21:13:48 -07:00
Jeff Brown
748ba16a04 Use new power manager API.
Change-Id: If0c58a9bee05ec0de434879e78cd95299e54e3fe
2012-08-14 14:38:12 -07:00
Dianne Hackborn
883329ca13 Fix issue #6603152: User-adjustable autobrightness broken?
Two issues:
- The new brightness was not being applied when switching out
  of auto-brightness mode.
- We were resetting to the last brightness level when switching
  modes.  This is because at that point we read the current
  brightness setting, but that isn't changed as the user adjusts
  only when the final value is committed.  To fix this, we have
  a new local variable keeping track of the last brightness value
  we have shown and use that when we haven't committed the
  brightness to settings.

Change-Id: I7cc02c9f90128eacec427587a3f6b8f25ede4bd3
2012-06-04 15:32:54 -07:00
Jeff Brown
defcb0060d Update references to PowerManager constants that have moved.
Bug: 6435382
Change-Id: Ieea857644dc0cf758e0ff4fd595c6a0115457df0
2012-05-11 18:40:27 -07:00
Dianne Hackborn
622fc7aa5f Remove auto-brightness adjustment setting.
Not yet ready for release.

Change-Id: I4668e890080d63a29aeeeab4daad6a6466ae36af
2012-05-09 16:59:26 -07:00
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