diff options
author | uabdullah <uabdullah@google.com> | 2018-03-16 17:32:54 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-16 17:39:34 -0700 |
commit | a7530f84656f1060957b14a4c946fd02cf88f7cd (patch) | |
tree | 6131ce961e48b0c971abb8c9ef5977cbb0d588f0 /java/com/android/voicemail/stub | |
parent | fce3a793a925791b6ed22d8132db55cd6d7d3f15 (diff) |
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
Diffstat (limited to 'java/com/android/voicemail/stub')
-rw-r--r-- | java/com/android/voicemail/stub/StubVoicemailClient.java | 14 |
1 files changed, 12 insertions, 2 deletions
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; } @@ -86,6 +92,10 @@ public final class StubVoicemailClient implements VoicemailClient { } @Override + public void setVoicemailTranscriptionEnabled( + Context context, PhoneAccountHandle phoneAccountHandle, boolean enabled) {} + + @Override public void setVoicemailDonationEnabled( Context context, PhoneAccountHandle phoneAccountHandle, boolean enabled) {} |