diff options
author | Roman Birg <roman@cyngn.com> | 2016-04-25 15:12:43 -0700 |
---|---|---|
committer | Roman Birg <roman@cyngn.com> | 2016-05-03 14:22:40 -0700 |
commit | deed3e81fc5c94a19cf090b7c98a59d5583a91c8 (patch) | |
tree | de4093dbecc4213b6c63b1a36e22bce23b1a1f2f /src/com/android/settings/cyanogenmod | |
parent | 6f12b368dca8fa42cc22a5fbda254f577499c1a7 (diff) | |
download | packages_apps_Settings-deed3e81fc5c94a19cf090b7c98a59d5583a91c8.zip packages_apps_Settings-deed3e81fc5c94a19cf090b7c98a59d5583a91c8.tar.gz packages_apps_Settings-deed3e81fc5c94a19cf090b7c98a59d5583a91c8.tar.bz2 |
Settings: fix backlight illumination wrong summary
This fixes the visual indicator of the button illumination summary after
trying to disable. Previously after setting the timeout to never, would
display a summary of "1", or with 5, it would end up displaying 6 after
applying the settings.
Ticket: CYNGNOS-2565
Change-Id: Ia982e4849d0099b6e208b362770a431dc89dd2f1
Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'src/com/android/settings/cyanogenmod')
-rw-r--r-- | src/com/android/settings/cyanogenmod/BacklightTimeoutSeekBar.java | 21 | ||||
-rw-r--r-- | src/com/android/settings/cyanogenmod/ButtonBacklightBrightness.java | 2 |
2 files changed, 1 insertions, 22 deletions
diff --git a/src/com/android/settings/cyanogenmod/BacklightTimeoutSeekBar.java b/src/com/android/settings/cyanogenmod/BacklightTimeoutSeekBar.java index 66a6d3f..66f1fdd 100644 --- a/src/com/android/settings/cyanogenmod/BacklightTimeoutSeekBar.java +++ b/src/com/android/settings/cyanogenmod/BacklightTimeoutSeekBar.java @@ -60,27 +60,6 @@ public class BacklightTimeoutSeekBar extends SeekBar { } @Override - public void setProgress(int progress) { - if (progress == 0) { - progress = getMax(); - } else { - progress--; - } - super.setProgress(progress); - } - - @Override - public int getProgress() { - int progress = super.getProgress(); - if (mUpdatingThumb) { - return progress; - } else if (progress == getMax()) { - return 0; - } - return progress + 1; - } - - @Override protected int updateTouchProgress(int lastProgress, int newProgress) { if (newProgress < mMax) { return newProgress; diff --git a/src/com/android/settings/cyanogenmod/ButtonBacklightBrightness.java b/src/com/android/settings/cyanogenmod/ButtonBacklightBrightness.java index a15a55c..7c63f34 100644 --- a/src/com/android/settings/cyanogenmod/ButtonBacklightBrightness.java +++ b/src/com/android/settings/cyanogenmod/ButtonBacklightBrightness.java @@ -252,7 +252,7 @@ public class ButtonBacklightBrightness extends DialogPreference implements if (buttonBrightness == 0) { setSummary(R.string.backlight_summary_disabled); } else if (timeout == 0) { - setSummary(R.string.backlight_summary_enabled); + setSummary(R.string.backlight_timeout_unlimited); } else { setSummary(getContext().getString(R.string.backlight_summary_enabled_with_timeout, getTimeoutString(timeout))); |