OSDN Git Service

Settings: Always set ramp-up time value during bindView
authorKeith Mok <kmok@cyngn.com>
Tue, 12 Jul 2016 16:45:45 +0000 (09:45 -0700)
committerKeith Mok <kmok@cyngn.com>
Tue, 12 Jul 2016 16:49:36 +0000 (09:49 -0700)
onProgressChange is not always called if we set the
ramp up time to 5 sec (0 in seekbar value, since it is
the default value, no change).
Causing the text showing the ramp up time text value not
updated and display as empty when user enable/disable
increasing ring volume with ramp up time set to 5 sec.

FEIJ-1572

Change-Id: Id32d6b51aab05e80be59bc1912c4ae7c5d114ac5

src/com/android/settings/notification/IncreasingRingVolumePreference.java

index 6b78bbe..8a55eaa 100644 (file)
@@ -143,6 +143,8 @@ public class IncreasingRingVolumePreference extends Preference implements
         mStartVolumeSeekBar.setOnSeekBarChangeListener(this);
         mRampUpTimeSeekBar.setOnSeekBarChangeListener(this);
         mRampUpTimeSeekBar.setProgress((rampUpTime / 5) - 1);
+        mRampUpTimeValue.setText(
+                Formatter.formatShortElapsedTime(getContext(), rampUpTime * 1000));
     }
 
     @Override