diff options
author | Adnan Begovic <adnan@cyngn.com> | 2015-10-29 17:04:06 -0700 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-29 17:36:32 -0700 |
commit | 3931eaedb8f1fb20247315bb8c6547c42a8aee77 (patch) | |
tree | 0feb8fae9948f4e4609873350577330a2c5826c0 /src/com/android/settings/notification/IncreasingRingVolumePreference.java | |
parent | dc69b7f50d8e5bb374838bcb6919ac6bb263fbee (diff) | |
download | packages_apps_Settings-3931eaedb8f1fb20247315bb8c6547c42a8aee77.zip packages_apps_Settings-3931eaedb8f1fb20247315bb8c6547c42a8aee77.tar.gz packages_apps_Settings-3931eaedb8f1fb20247315bb8c6547c42a8aee77.tar.bz2 |
Settings: Map to CM Settings.
Change-Id: I2236b8b6b7cf1ad5e5db4ca1ec32d84351d2a08b
Diffstat (limited to 'src/com/android/settings/notification/IncreasingRingVolumePreference.java')
-rw-r--r-- | src/com/android/settings/notification/IncreasingRingVolumePreference.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/com/android/settings/notification/IncreasingRingVolumePreference.java b/src/com/android/settings/notification/IncreasingRingVolumePreference.java index c08a369..2d706aa 100644 --- a/src/com/android/settings/notification/IncreasingRingVolumePreference.java +++ b/src/com/android/settings/notification/IncreasingRingVolumePreference.java @@ -35,6 +35,7 @@ import android.widget.SeekBar; import android.widget.TextView; import com.android.settings.R; +import cyanogenmod.providers.CMSettings; public class IncreasingRingVolumePreference extends Preference implements PreferenceManager.OnActivityStopListener, Handler.Callback, @@ -122,10 +123,10 @@ public class IncreasingRingVolumePreference extends Preference implements mRampUpTimeValue = (TextView) view.findViewById(R.id.ramp_up_time_value); final ContentResolver cr = getContext().getContentResolver(); - float startVolume = Settings.System.getFloat(cr, - Settings.System.INCREASING_RING_START_VOLUME, 0.1f); - int rampUpTime = Settings.System.getInt(cr, - Settings.System.INCREASING_RING_RAMP_UP_TIME, 10); + float startVolume = CMSettings.System.getFloat(cr, + CMSettings.System.INCREASING_RING_START_VOLUME, 0.1f); + int rampUpTime = CMSettings.System.getInt(cr, + CMSettings.System.INCREASING_RING_RAMP_UP_TIME, 10); mStartVolumeSeekBar.setProgress(Math.round(startVolume * 1000F)); mStartVolumeSeekBar.setOnSeekBarChangeListener(this); @@ -151,14 +152,14 @@ public class IncreasingRingVolumePreference extends Preference implements public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch) { ContentResolver cr = getContext().getContentResolver(); if (fromTouch && seekBar == mStartVolumeSeekBar) { - Settings.System.putFloat(cr, Settings.System.INCREASING_RING_START_VOLUME, + CMSettings.System.putFloat(cr, CMSettings.System.INCREASING_RING_START_VOLUME, (float) progress / 1000F); } else if (seekBar == mRampUpTimeSeekBar) { int seconds = (progress + 1) * 5; mRampUpTimeValue.setText( Formatter.formatShortElapsedTime(getContext(), seconds * 1000)); if (fromTouch) { - Settings.System.putInt(cr, Settings.System.INCREASING_RING_RAMP_UP_TIME, seconds); + CMSettings.System.putInt(cr, CMSettings.System.INCREASING_RING_RAMP_UP_TIME, seconds); } } } |