Skip to content
Browse files

Merge "Reorganize Phone Settings"

  • Loading branch information...
2 parents 8ae1f22 + 12410b8 commit 5a4f9e514919ff2a7551d2a3838d452505d62dcc Daisuke Miyakawa committed with Android (Google) Code Review Apr 24, 2012
Showing with 66 additions and 61 deletions.
  1. +4 −0 res/values/strings.xml
  2. +62 −58 res/xml/call_feature_setting.xml
  3. +0 −3 src/com/android/phone/CallFeaturesSetting.java
View
4 res/values/strings.xml
@@ -1465,4 +1465,8 @@
<!-- Setting option name to enable or disable DTMF tone sound
[CHAR LIMIT=40] -->
<string name="dtmf_tone_enable_title">Dial pad touch tones</string>
+
+ <!-- Title for the category "ringtone", which is shown above ringote settings
+ [CHAR LIMIT=40] -->
+ <string name="preference_category_ringtone">Ringtone</string>
</resources>
View
120 res/xml/call_feature_setting.xml
@@ -15,83 +15,60 @@
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:phone="http://schemas.android.com/apk/res/com.android.phone"
- android:title="@string/call_settings">
+ android:title="@string/call_settings">
- <com.android.phone.DefaultRingtonePreference
- android:key="button_ringtone_key"
- android:title="@string/ringtone_title"
- android:dialogTitle="@string/ringtone_title"
- android:persistent="false"
- android:ringtoneType="ringtone" />
-
- <CheckBoxPreference
- android:key="button_vibrate_on_ring"
- android:title="@string/vibrate_on_ring_title"
- android:persistent="false"
- android:defaultValue="false" />
-
- <CheckBoxPreference
- android:key="button_play_dtmf_tone"
- android:title="@string/dtmf_tone_enable_title"
- android:persistent="false"
- android:defaultValue="true" />
-
- <PreferenceScreen
- android:key="button_fdn_key"
- android:title="@string/fdn"
- android:summary="@string/sum_fdn"
+ <PreferenceCategory
+ android:key="button_ringtone_category_key"
+ android:title="@string/preference_category_ringtone"
android:persistent="false">
- <intent android:action="android.intent.action.MAIN"
- android:targetPackage="com.android.phone"
- android:targetClass="com.android.phone.FdnSetting" />
+ <com.android.phone.DefaultRingtonePreference
+ android:key="button_ringtone_key"
+ android:title="@string/ringtone_title"
+ android:dialogTitle="@string/ringtone_title"
+ android:persistent="false"
+ android:ringtoneType="ringtone" />
- </PreferenceScreen>
-
- <PreferenceScreen
- android:key="button_respond_via_sms_key"
- android:title="@string/respond_via_sms_setting_title"
- android:summary="@string/respond_via_sms_setting_summary"
- android:persistent="false">
-
- <intent android:action="android.intent.action.MAIN"
- android:targetPackage="com.android.phone"
- android:targetClass="com.android.phone.RespondViaSmsManager$Settings" />
- </PreferenceScreen>
+ <CheckBoxPreference
+ android:key="button_vibrate_on_ring"
+ android:title="@string/vibrate_on_ring_title"
+ android:persistent="false"
+ android:defaultValue="false" />
+ </PreferenceCategory>
<PreferenceCategory
android:key="button_voicemail_category_key"
android:title="@string/voicemail"
android:persistent="false">
- <ListPreference
- 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"
+ <ListPreference
+ 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 -->
+ 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
+ <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>
+ </PreferenceScreen>
<RingtonePreference
android:key="button_voicemail_notification_ringtone_key"
@@ -110,9 +87,36 @@
android:dialogTitle="@string/voicemail_notification_vibarte_when_dialog_title" />
</PreferenceCategory>
- <PreferenceCategory android:key="button_misc_category_key"
- android:title="@string/other_settings"
- android:persistent="false" />
+ <PreferenceCategory
+ android:key="button_misc_category_key"
+ android:title="@string/other_settings"
+ android:persistent="false" />
+
+ <CheckBoxPreference
+ android:key="button_play_dtmf_tone"
+ android:title="@string/dtmf_tone_enable_title"
+ android:persistent="false"
+ android:defaultValue="true" />
+
+ <PreferenceScreen
+ android:key="button_respond_via_sms_key"
+ android:title="@string/respond_via_sms_setting_title"
+ android:summary="@string/respond_via_sms_setting_summary"
+ android:persistent="false">
+ <intent
+ android:action="android.intent.action.MAIN"
+ android:targetPackage="com.android.phone"
+ android:targetClass="com.android.phone.RespondViaSmsManager$Settings" />
+ </PreferenceScreen>
+
+ <PreferenceScreen
+ android:key="button_fdn_key"
+ android:title="@string/fdn"
+ android:persistent="false">
+ <intent android:action="android.intent.action.MAIN"
+ android:targetPackage="com.android.phone"
+ android:targetClass="com.android.phone.FdnSetting" />
+ </PreferenceScreen>
<CheckBoxPreference
android:key="button_auto_retry_key"
View
3 src/com/android/phone/CallFeaturesSetting.java
@@ -1830,7 +1830,6 @@ private void updateVMPreferenceWidgets(String currentProviderSetting) {
log("updateVMPreferenceWidget: provider for the key \"" + key + "\" is null.");
}
mVoicemailProviders.setSummary(getString(R.string.sum_voicemail_choose_provider));
- mVoicemailSettings.setSummary("");
mVoicemailSettings.setEnabled(false);
mVoicemailSettings.setIntent(null);
@@ -1844,8 +1843,6 @@ private void updateVMPreferenceWidgets(String currentProviderSetting) {
}
final String providerName = provider.name;
mVoicemailProviders.setSummary(providerName);
- mVoicemailSettings.setSummary(getApplicationContext().getString(
- R.string.voicemail_settings_for, providerName));
mVoicemailSettings.setEnabled(true);
mVoicemailSettings.setIntent(provider.intent);

0 comments on commit 5a4f9e5

Please sign in to comment.
Something went wrong with that request. Please try again.