diff options
author | Joe Onorato <joeo@google.com> | 2011-01-16 11:10:16 -0800 |
---|---|---|
committer | Joe Onorato <joeo@google.com> | 2011-01-16 11:10:16 -0800 |
commit | 772f5600ef720945b98054246982fd3b711830a9 (patch) | |
tree | f910983c56913dc72db2d4e9f936201ec9fbf167 /packages/SystemUI | |
parent | a032c90189d9ac28b65af4fe5f8b34f182441335 (diff) | |
download | frameworks_base-772f5600ef720945b98054246982fd3b711830a9.zip frameworks_base-772f5600ef720945b98054246982fd3b711830a9.tar.gz frameworks_base-772f5600ef720945b98054246982fd3b711830a9.tar.bz2 |
Need to save the brigness setting.
Otherwise the value isn't preserved the next time the screen goes off.
Bug: 3356129
Change-Id: I78fd32ee66a0766ec254b8558d483e97ffdccd7e
Diffstat (limited to 'packages/SystemUI')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java index c11d04e..ca1d98f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java @@ -79,7 +79,12 @@ public class BrightnessController implements ToggleSlider.Listener { setMode(automatic ? Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC : Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL); if (!automatic) { - setBrightness(value + MINIMUM_BACKLIGHT); + value = value + value + MINIMUM_BACKLIGHT; + setBrightness(value); + if (!tracking) { + Settings.System.putInt(mContext.getContentResolver(), + Settings.System.SCREEN_BRIGHTNESS, value); + } } } |