From 772f5600ef720945b98054246982fd3b711830a9 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Sun, 16 Jan 2011 11:10:16 -0800 Subject: Need to save the brigness setting. Otherwise the value isn't preserved the next time the screen goes off. Bug: 3356129 Change-Id: I78fd32ee66a0766ec254b8558d483e97ffdccd7e --- .../android/systemui/statusbar/policy/BrightnessController.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java') 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); + } } } -- cgit v1.1