Cleanup SoundSettingsFragment.
+ No functional change, but cleaner / more robust code.
+ Converted preference keys into shared string constants.
+ Reorganized code in SoundSettingsFragment into clearer helpers.
+ Defined constants for "magic" values used for sound preferences.
Bug: 19372734
Change-Id: Ic0eb44d72548909ae6c520b18e0f4e2a2d013ac6
diff --git a/res/xml/sound_settings.xml b/res/xml/sound_settings.xml
index e933eed..ebe0f51 100644
--- a/res/xml/sound_settings.xml
+++ b/res/xml/sound_settings.xml
@@ -19,20 +19,20 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.dialer.settings.DefaultRingtonePreference
- android:key="button_ringtone_key"
+ android:key="@string/ringtone_preference_key"
android:title="@string/ringtone_title"
android:dialogTitle="@string/ringtone_title"
android:persistent="false"
android:ringtoneType="ringtone" />
<CheckBoxPreference
- android:key="button_play_dtmf_tone"
+ android:key="@string/play_dtmf_preference_key"
android:title="@string/dtmf_tone_enable_title"
android:persistent="false"
android:defaultValue="true" />
<CheckBoxPreference
- android:key="button_vibrate_on_ring"
+ android:key="@string/vibrate_on_preference_key"
android:title="@string/vibrate_on_ring_title"
android:persistent="false"
android:defaultValue="false" />