Port VM settings to its own activity.
I gave up on PreferenceFragments because it's too hard to migrate
the Activity Dialog logic at this point. Moving voicemail settings
code to its own activity, with an eye towards avoiding any breakages
in the attends related to it.
I tried to rearrange some methods for better organization while I
was at it... all this logic is still in much need of clarity, but
I figure this is no worse of a state than before, and at least now
it's separated from the rest of the call settings.
No (deliberate) changes to logic besides that.
Bug: 17019623
Change-Id: I20aa177ca699ad2c823e49f0fed0dcd89f75596d
diff --git a/res/xml/voicemail_settings.xml b/res/xml/voicemail_settings.xml
index f4679e5..a7d5fb4 100644
--- a/res/xml/voicemail_settings.xml
+++ b/res/xml/voicemail_settings.xml
@@ -15,9 +15,50 @@
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:phone="http://schemas.android.com/apk/res/com.android.phone"
android:title="@string/voicemail">
- <!-- Temporary placeholder until prefs are migrated from Call Settings. -->
- <Preference android:title="@string/voicemail" />
+ <com.android.phone.settings.VoicemailProviderListPreference
+ android:key="button_voicemail_provider_key"
+ android:title="@string/voicemail_provider"
+ android:summary="@string/sum_voicemail_choose_provider"
+ android:defaultValue=""
+ android:persistent="true" />
+
+ <PreferenceScreen
+ android:key="button_voicemail_setting_key"
+ android:title="@string/voicemail_settings"
+ android:persistent="false">
+
+ <!-- Note for all com.android.phone.EditPhoneNumberPreference objects
+
+ The last several attributes are for use with the EditText field
+ in the dialog. These attributes are forwarded to that field
+ when the edittext is created. The attributes include:
+ 1. android:singleLine
+ 2. android:autoText
+ 3. android:background -->
+
+ <com.android.phone.EditPhoneNumberPreference
+ android:key="button_voicemail_key"
+ android:title="@string/voicemail_settings_number_label"
+ android:persistent="false"
+ android:dialogTitle="@string/voicemail"
+ phone:confirmMode="confirm"
+ android:singleLine="true"
+ android:autoText="false" />
+
+ </PreferenceScreen>
+
+ <com.android.phone.settings.VoicemailRingtonePreference
+ android:key="@string/voicemail_notification_ringtone_key"
+ android:title="@string/voicemail_notification_ringtone_title"
+ android:persistent="false"
+ android:ringtoneType="notification" />
+
+ <CheckBoxPreference
+ android:key="@string/voicemail_notification_vibrate_key"
+ android:title="@string/voicemail_notification_vibrate_when_title"
+ android:persistent="true" />
</PreferenceScreen>