Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Need to save the brigness setting.
Browse files Browse the repository at this point in the history
Otherwise the value isn't preserved the next time the screen goes off.

Bug: 3356129
Change-Id: I78fd32ee66a0766ec254b8558d483e97ffdccd7e
  • Loading branch information
onoratoj committed Jan 16, 2011
1 parent a032c90 commit 772f560
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ public void onChanged(ToggleSlider view, boolean tracking, boolean automatic, in
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);
}
}
}

Expand Down

0 comments on commit 772f560

Please sign in to comment.