diff options
author | uabdullah <uabdullah@google.com> | 2018-03-27 15:12:22 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-27 18:14:36 -0700 |
commit | 540385d1fb39df3e5cbf6553e988089739ef92d1 (patch) | |
tree | 2c46a32e066f6a63b1c7b21e40c6d552f4845050 /java/com/android/dialer/voicemail/listui/error/VoicemailTosMessageCreator.java | |
parent | 0aac99095d8a8776d9e6e87175b0cd861c53b503 (diff) |
Turn off transcription when user declines tos (existing dialer user)
When an existing dialer user is shown the ToS and they declines it, the transcription setting must be turned off, to respect the users wishes.
We also no longer take the user to the settings page.
Bug: 74033229,77147114
Test: Unit test
PiperOrigin-RevId: 190682249
Change-Id: I8c0abf9f3cbb15ded12a760abe540c557fd2e7d3
Diffstat (limited to 'java/com/android/dialer/voicemail/listui/error/VoicemailTosMessageCreator.java')
-rw-r--r-- | java/com/android/dialer/voicemail/listui/error/VoicemailTosMessageCreator.java | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/java/com/android/dialer/voicemail/listui/error/VoicemailTosMessageCreator.java b/java/com/android/dialer/voicemail/listui/error/VoicemailTosMessageCreator.java index ec1a95a1a..ba9e35012 100644 --- a/java/com/android/dialer/voicemail/listui/error/VoicemailTosMessageCreator.java +++ b/java/com/android/dialer/voicemail/listui/error/VoicemailTosMessageCreator.java @@ -22,7 +22,6 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; -import android.net.Uri; import android.os.Build; import android.preference.PreferenceManager; import android.support.annotation.Nullable; @@ -40,11 +39,9 @@ import android.view.View.OnClickListener; import com.android.dialer.common.LogUtil; import com.android.dialer.compat.telephony.TelephonyManagerCompat; import com.android.dialer.configprovider.ConfigProviderBindings; -import com.android.dialer.constants.Constants; import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; import com.android.dialer.voicemail.listui.error.VoicemailErrorMessage.Action; -import com.android.dialer.voicemail.settings.VoicemailSettingsFragment; import com.android.voicemail.VisualVoicemailTypeExtensions; import com.android.voicemail.VoicemailClient; import com.android.voicemail.VoicemailComponent; @@ -129,19 +126,16 @@ public class VoicemailTosMessageCreator { getExistingUserTosTitle(), getExistingUserTosMessageText(), new Action( - context.getString(R.string.dialer_terms_and_conditions_existing_user_setings), + context.getString(R.string.dialer_terms_and_conditions_existing_user_decline), new OnClickListener() { @Override public void onClick(View v) { - LogUtil.i("VoicemailTosMessageCreator.getPromoMessage", "open settings"); - Intent intent = - new Intent(Intent.ACTION_VIEW) - .setComponent( - new ComponentName(context, Constants.get().getSettingsActivity())) - .setData( - Uri.fromParts( - "header", VoicemailSettingsFragment.class.getName(), null)); - context.startActivity(intent); + LogUtil.i( + "VoicemailTosMessageCreator.getPromoMessage", "declined transcription"); + VoicemailClient voicemailClient = + VoicemailComponent.get(context).getVoicemailClient(); + voicemailClient.setVoicemailTranscriptionEnabled( + context, status.getPhoneAccountHandle(), false); } }), new Action( |