diff options
author | Pawit Pornkitprasan <p.pawit@gmail.com> | 2013-03-31 18:08:11 +0700 |
---|---|---|
committer | Pawit Pornkitprasan <p.pawit@gmail.com> | 2013-03-31 18:08:23 +0700 |
commit | f2714e4ef5283c32360c3f98eb995c553094821b (patch) | |
tree | bf71294276131c9494c8d3aa8f786085bd7f6abe /src | |
parent | 54a5d859de90e2e1e218fa35c1e2f62c76c25ef8 (diff) | |
download | packages_apps_settings-f2714e4ef5283c32360c3f98eb995c553094821b.zip packages_apps_settings-f2714e4ef5283c32360c3f98eb995c553094821b.tar.gz packages_apps_settings-f2714e4ef5283c32360c3f98eb995c553094821b.tar.bz2 |
Settings: fix incorrect value in autobrightness adjustment
If the user drag the progress bar below the min value, the incorrect
setting will be saved since seekBar.setProgress code path does not
return to the "getItem(pos).backlight = ..." line.
Change-Id: I4796e22ba9c44315be92de4040f6cd8451bdf153
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/cyanogenmod/AutoBrightnessCustomizeDialog.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/settings/cyanogenmod/AutoBrightnessCustomizeDialog.java b/src/com/android/settings/cyanogenmod/AutoBrightnessCustomizeDialog.java index 3f93afc..f9b6e19 100644 --- a/src/com/android/settings/cyanogenmod/AutoBrightnessCustomizeDialog.java +++ b/src/com/android/settings/cyanogenmod/AutoBrightnessCustomizeDialog.java @@ -504,10 +504,10 @@ public class AutoBrightnessCustomizeDialog extends AlertDialog if (progress < minValue) { seekBar.setProgress(minValue); - return; + progress = minValue; } else if (progress > maxValue) { seekBar.setProgress(maxValue); - return; + progress = maxValue; } getItem(pos).backlight = Math.round(progressToBrightness(progress)); |