diff options
author | Eric Erfanian <erfanian@google.com> | 2017-05-03 23:10:39 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-03 23:10:39 +0000 |
commit | d67f1627521b174f12e0c247f154c7c93c5e408e (patch) | |
tree | 1a45d60921e293c6088efeaf4d9c408456f3e0e2 /java/com/android/voicemail/impl/VoicemailClientImpl.java | |
parent | 010981b798fbc6b8e6a00c3ea507f00c3e77c371 (diff) | |
parent | 8369df095a73a77b3715f8ae7ba06089cebca4ce (diff) |
This change reflects the Dialer V10 RC00 branch.
am: 8369df095a
Change-Id: I6820870feb74cba010ac3039e4da41325b3005f9
Diffstat (limited to 'java/com/android/voicemail/impl/VoicemailClientImpl.java')
-rw-r--r-- | java/com/android/voicemail/impl/VoicemailClientImpl.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/java/com/android/voicemail/impl/VoicemailClientImpl.java b/java/com/android/voicemail/impl/VoicemailClientImpl.java index 31a12791c..7747b2486 100644 --- a/java/com/android/voicemail/impl/VoicemailClientImpl.java +++ b/java/com/android/voicemail/impl/VoicemailClientImpl.java @@ -31,6 +31,7 @@ import com.android.voicemail.VoicemailClient; import com.android.voicemail.impl.settings.VisualVoicemailSettingsUtil; import com.android.voicemail.impl.settings.VoicemailChangePinActivity; import com.android.voicemail.impl.settings.VoicemailSettingsFragment; +import com.android.voicemail.impl.sync.VvmAccountManager; import java.util.List; import javax.inject.Inject; @@ -67,6 +68,17 @@ public class VoicemailClientImpl implements VoicemailClient { return true; } + @Override + public boolean isVoicemailEnabled(Context context, PhoneAccountHandle phoneAccountHandle) { + return VisualVoicemailSettingsUtil.isEnabled(context, phoneAccountHandle); + } + + @Override + public void setVoicemailEnabled( + Context context, PhoneAccountHandle phoneAccountHandle, boolean enabled) { + VisualVoicemailSettingsUtil.setEnabled(context, phoneAccountHandle, enabled); + } + @Nullable @Override public String getSettingsFragment() { @@ -85,7 +97,7 @@ public class VoicemailClientImpl implements VoicemailClient { return false; } - if (!ConfigProviderBindings.get(context).getBoolean(ALLOW_VOICEMAIL_ARCHIVE, true)) { + if (!ConfigProviderBindings.get(context).getBoolean(ALLOW_VOICEMAIL_ARCHIVE, false)) { LogUtil.i( "VoicemailClientImpl.isVoicemailArchiveAllowed", "feature disabled by config: %s", @@ -109,6 +121,11 @@ public class VoicemailClientImpl implements VoicemailClient { return intent; } + @Override + public boolean isActivated(Context context, PhoneAccountHandle phoneAccountHandle) { + return VvmAccountManager.isAccountActivated(context, phoneAccountHandle); + } + @TargetApi(VERSION_CODES.O) @Override public void appendOmtpVoicemailSelectionClause( |