summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Mok <kmok@cyngn.com>2016-07-15 09:30:39 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-07-25 22:10:21 -0700
commit60455643e7090924be7e0d9ddd1acd592aef7e3c (patch)
treea0081974d0269d1374cc9a86be2ecff60bad82e1
parent64d31819ea6e4abb683490913981d8f54443f6ab (diff)
downloadpackages_apps_Settings-60455643e7090924be7e0d9ddd1acd592aef7e3c.zip
packages_apps_Settings-60455643e7090924be7e0d9ddd1acd592aef7e3c.tar.gz
packages_apps_Settings-60455643e7090924be7e0d9ddd1acd592aef7e3c.tar.bz2
Settings: Always set text value in color temperature
onProgressChange is not always called if we set the color temperature to minimum, since it is the default value (no change). Causing the text showing the color temperature is empty. Call onProgressChange explicitly during init. FEIJ-1581 Change-Id: I7e0f8995cfc62a53770e787dc649109b9c3bf189
-rw-r--r--src/com/android/settings/livedisplay/DisplayTemperature.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/settings/livedisplay/DisplayTemperature.java b/src/com/android/settings/livedisplay/DisplayTemperature.java
index 920d197..350ef62 100644
--- a/src/com/android/settings/livedisplay/DisplayTemperature.java
+++ b/src/com/android/settings/livedisplay/DisplayTemperature.java
@@ -244,6 +244,10 @@ public class DisplayTemperature extends DialogPreference {
}
mSeekBar.setMax(mBarMax);
mSeekBar.setOnSeekBarChangeListener(this);
+
+ // init text value
+ int p = mSeekBar.getProgress();
+ onProgressChanged(mSeekBar, p, false);
}
@Override