From 60455643e7090924be7e0d9ddd1acd592aef7e3c Mon Sep 17 00:00:00 2001 From: Keith Mok Date: Fri, 15 Jul 2016 09:30:39 -0700 Subject: 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 --- src/com/android/settings/livedisplay/DisplayTemperature.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/com') 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 -- cgit v1.1