diff options
author | uabdullah <uabdullah@google.com> | 2018-03-28 21:17:30 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-03-28 21:17:30 +0000 |
commit | 043159bbba13fc013c33921587fe47e25235185a (patch) | |
tree | fc9d94cba9d3525476c350213fbf117bf2d2b192 | |
parent | 68bc6c3e29636b58e83c6333b4fa31fb0454487e (diff) | |
parent | 1dc6d6722590fd38431d56f3d7bef6407342bc23 (diff) |
Merge "When declining Transcription ToS, we should hide the feature ToS." am: 3f8c00a775
am: 1dc6d67225
Change-Id: Idf6bba00d286445592bf4ee0ac7abd449f7568bf
-rw-r--r-- | java/com/android/dialer/voicemail/listui/error/VoicemailTosMessageCreator.java | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/java/com/android/dialer/voicemail/listui/error/VoicemailTosMessageCreator.java b/java/com/android/dialer/voicemail/listui/error/VoicemailTosMessageCreator.java index 382118fca..15eaa423e 100644 --- a/java/com/android/dialer/voicemail/listui/error/VoicemailTosMessageCreator.java +++ b/java/com/android/dialer/voicemail/listui/error/VoicemailTosMessageCreator.java @@ -131,10 +131,23 @@ public class VoicemailTosMessageCreator { public void onClick(View v) { LogUtil.i( "VoicemailTosMessageCreator.getPromoMessage", "declined transcription"); - VoicemailClient voicemailClient = - VoicemailComponent.get(context).getVoicemailClient(); - voicemailClient.setVoicemailTranscriptionEnabled( - context, status.getPhoneAccountHandle(), false); + if (isVoicemailTranscriptionAvailable()) { + VoicemailClient voicemailClient = + VoicemailComponent.get(context).getVoicemailClient(); + voicemailClient.setVoicemailTranscriptionEnabled( + context, status.getPhoneAccountHandle(), false); + // Feature acknowledgement also means accepting TOS, otherwise after removing + // the feature ToS, we'll end up showing the ToS + // TODO(uabdullah): Consider separating the ToS acceptance and feature + // acknowledgment. + recordTosAcceptance(); + recordFeatureAcknowledgement(); + statusReader.refresh(); + } else { + LogUtil.e( + "VoicemailTosMessageCreator.getPromoMessage", + "voicemail transcription not available"); + } } }), new Action( |