Need to save the brigness setting.

Otherwise the value isn't preserved the next time the screen goes off.

Bug: 3356129
Change-Id: I78fd32ee66a0766ec254b8558d483e97ffdccd7e
This commit is contained in:
Joe Onorato
2011-01-16 11:10:16 -08:00
parent a032c90189
commit 772f5600ef

View File

@@ -79,7 +79,12 @@ public class BrightnessController implements ToggleSlider.Listener {
setMode(automatic ? Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC setMode(automatic ? Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC
: Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL); : Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
if (!automatic) { 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);
}
} }
} }