diff options
Diffstat (limited to 'java/com/android/voicemail/impl/settings')
-rw-r--r-- | java/com/android/voicemail/impl/settings/VoicemailSettingsFragment.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/java/com/android/voicemail/impl/settings/VoicemailSettingsFragment.java b/java/com/android/voicemail/impl/settings/VoicemailSettingsFragment.java index 8041e5b75..2fc08f0ae 100644 --- a/java/com/android/voicemail/impl/settings/VoicemailSettingsFragment.java +++ b/java/com/android/voicemail/impl/settings/VoicemailSettingsFragment.java @@ -122,9 +122,6 @@ public class VoicemailSettingsFragment extends PreferenceFragment autoArchiveSwitchPreference = (SwitchPreference) findPreference(getString(R.string.voicemail_visual_voicemail_archive_key)); - autoArchiveSwitchPreference.setOnPreferenceChangeListener(this); - autoArchiveSwitchPreference.setChecked( - VisualVoicemailSettingsUtil.isArchiveEnabled(getContext(), phoneAccountHandle)); if (!ConfigProviderBindings.get(getContext()) .getBoolean(VisualVoicemailSettingsUtil.ALLOW_VOICEMAIL_ARCHIVE, true)) { @@ -156,11 +153,19 @@ public class VoicemailSettingsFragment extends PreferenceFragment voicemailVisualVoicemail.setOnPreferenceChangeListener(this); voicemailVisualVoicemail.setChecked( VisualVoicemailSettingsUtil.isEnabled(getContext(), phoneAccountHandle)); + + autoArchiveSwitchPreference.setOnPreferenceChangeListener(this); + autoArchiveSwitchPreference.setSummary( + getText(R.string.voicemail_visual_voicemail_auto_archive_temporary_disclaimer)); + autoArchiveSwitchPreference.setChecked( + VisualVoicemailSettingsUtil.isArchiveEnabled(getContext(), phoneAccountHandle)); + if (!isVisualVoicemailActivated()) { prefSet.removePreference(voicemailChangePinPreference); } } else { prefSet.removePreference(voicemailVisualVoicemail); + prefSet.removePreference(autoArchiveSwitchPreference); prefSet.removePreference(voicemailChangePinPreference); } |