From a7530f84656f1060957b14a4c946fd02cf88f7cd Mon Sep 17 00:00:00 2001 From: uabdullah Date: Fri, 16 Mar 2018 17:32:54 -0700 Subject: Refactor VM Settings and add support for voicemail transcription This CL refactors the existing voicemail settings fragment and adds UI support for voicemail transcription. It mainly deals with the following: - ensuring that when the VVM toggle is turned off, transcription and donations are gone. - when transcription is off, donation preference is gone. - donation is only available when transcription is available and enabled - as part of the refactor, fixes existing logging bugs - breaks preferences and its associated methods into helper methods when possible - groups relevant preferences together when possible Bug: 74033229 Test: Unit tests PiperOrigin-RevId: 189418217 Change-Id: I3442cb5752a235cfca643ba55df3fb75171e3fe4 --- java/com/android/voicemail/stub/StubVoicemailClient.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'java/com/android/voicemail/stub') diff --git a/java/com/android/voicemail/stub/StubVoicemailClient.java b/java/com/android/voicemail/stub/StubVoicemailClient.java index 2b02261c4..0a1d55351 100644 --- a/java/com/android/voicemail/stub/StubVoicemailClient.java +++ b/java/com/android/voicemail/stub/StubVoicemailClient.java @@ -71,12 +71,18 @@ public final class StubVoicemailClient implements VoicemailClient { Context context, PhoneAccountHandle phoneAccountHandle, boolean value) {} @Override - public boolean isVoicemailTranscriptionAvailable(Context context) { + public boolean isVoicemailTranscriptionAvailable( + Context context, PhoneAccountHandle phoneAccountHandle) { return false; } @Override - public boolean isVoicemailDonationAvailable(Context context) { + public boolean isVoicemailTranscriptionEnabled(Context context, PhoneAccountHandle account) { + return false; + } + + @Override + public boolean isVoicemailDonationAvailable(Context context, PhoneAccountHandle account) { return false; } @@ -85,6 +91,10 @@ public final class StubVoicemailClient implements VoicemailClient { return false; } + @Override + public void setVoicemailTranscriptionEnabled( + Context context, PhoneAccountHandle phoneAccountHandle, boolean enabled) {} + @Override public void setVoicemailDonationEnabled( Context context, PhoneAccountHandle phoneAccountHandle, boolean enabled) {} -- cgit v1.2.3