diff options
author | Danesh M <daneshm90@gmail.com> | 2015-12-17 16:59:45 -0800 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2015-12-18 13:06:35 -0800 |
commit | 7cb203df130dcc391a0e5a10e2698d2a14a044ce (patch) | |
tree | a6de6ebbf15237e260f4acbb4592b22b209065d2 | |
parent | efff5687c17538781e804af483df7d385e60010d (diff) | |
download | packages_apps_Settings-7cb203df130dcc391a0e5a10e2698d2a14a044ce.zip packages_apps_Settings-7cb203df130dcc391a0e5a10e2698d2a14a044ce.tar.gz packages_apps_Settings-7cb203df130dcc391a0e5a10e2698d2a14a044ce.tar.bz2 |
Settings : Cleanup control media volume toggle
Change-Id: I1e887e6a109aa75fcb1d1e74216fceb1cc91ab59
-rw-r--r-- | res/xml/button_settings.xml | 2 | ||||
-rw-r--r-- | src/com/android/settings/ButtonSettings.java | 13 |
2 files changed, 1 insertions, 14 deletions
diff --git a/res/xml/button_settings.xml b/res/xml/button_settings.xml index 2e47f2e..7307084 100644 --- a/res/xml/button_settings.xml +++ b/res/xml/button_settings.xml @@ -244,7 +244,7 @@ android:summary="@string/volbtn_music_controls_summary" android:defaultValue="true" /> - <com.android.settings.cyanogenmod.SecureSettingSwitchPreference + <com.android.settings.cyanogenmod.CMSystemSettingSwitchPreference android:key="volume_keys_control_ring_stream" android:title="@string/volume_keys_control_ring_stream_title" android:summaryOn="@string/volume_keys_control_ring_stream_summary_on" diff --git a/src/com/android/settings/ButtonSettings.java b/src/com/android/settings/ButtonSettings.java index 48c134e..6a2d2ed 100644 --- a/src/com/android/settings/ButtonSettings.java +++ b/src/com/android/settings/ButtonSettings.java @@ -133,7 +133,6 @@ public class ButtonSettings extends SettingsPreferenceFragment implements private ListPreference mVolumeKeyCursorControl; private SwitchPreference mVolumeWakeScreen; private SwitchPreference mVolumeMusicControls; - private SwitchPreference mVolumeControlRingStream; private SwitchPreference mSwapVolumeButtons; private SwitchPreference mDisableNavigationKeys; private SwitchPreference mNavigationBarLeftPref; @@ -442,14 +441,6 @@ public class ButtonSettings extends SettingsPreferenceFragment implements mVolumeWakeScreen = (SwitchPreference) findPreference(CMSettings.System.VOLUME_WAKE_SCREEN); mVolumeMusicControls = (SwitchPreference) findPreference(KEY_VOLUME_MUSIC_CONTROLS); - mVolumeControlRingStream = (SwitchPreference) - findPreference(KEY_VOLUME_CONTROL_RING_STREAM); - int volumeControlRingtone = CMSettings.System.getInt(getContentResolver(), - CMSettings.System.VOLUME_KEYS_CONTROL_RING_STREAM, 1); - if (mVolumeControlRingStream != null) { - mVolumeControlRingStream.setChecked(volumeControlRingtone > 0); - } - if (mVolumeWakeScreen != null) { if (mVolumeMusicControls != null) { mVolumeMusicControls.setDependency(CMSettings.System.VOLUME_WAKE_SCREEN); @@ -726,10 +717,6 @@ public class ButtonSettings extends SettingsPreferenceFragment implements ? (ScreenType.isTablet(getActivity()) ? 2 : 1) : 0; CMSettings.System.putInt(getActivity().getContentResolver(), CMSettings.System.SWAP_VOLUME_KEYS_ON_ROTATION, value); - } else if (preference == mVolumeControlRingStream) { - int value = mVolumeControlRingStream.isChecked() ? 1 : 0; - CMSettings.System.putInt(getActivity().getContentResolver(), - CMSettings.System.VOLUME_KEYS_CONTROL_RING_STREAM, value); } else if (preference == mDisableNavigationKeys) { mDisableNavigationKeys.setEnabled(false); mNavigationPreferencesCat.setEnabled(false); |