From ad2ea23c5762bee680a74d56664644b578625cd2 Mon Sep 17 00:00:00 2001 From: mdooley Date: Tue, 12 Dec 2017 16:14:13 -0800 Subject: Cleanup. Changing voicemail_transcription_enabled to voicemail_transcription_available Follow the convention that features allowed by server configuration flags use the word 'available' and when a feature is allowed by the user via settings then use the word 'enabled' Bug: 37340510 Test: manual and updated unit tests PiperOrigin-RevId: 178831467 Change-Id: I5691fd7db45a70908d32cdac2b049fe76e6a0680 --- .../app/voicemail/error/VoicemailTosMessageCreator.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'java/com/android/dialer/app') diff --git a/java/com/android/dialer/app/voicemail/error/VoicemailTosMessageCreator.java b/java/com/android/dialer/app/voicemail/error/VoicemailTosMessageCreator.java index 2787320fa..a714b6d90 100644 --- a/java/com/android/dialer/app/voicemail/error/VoicemailTosMessageCreator.java +++ b/java/com/android/dialer/app/voicemail/error/VoicemailTosMessageCreator.java @@ -187,7 +187,7 @@ public class VoicemailTosMessageCreator { return true; } - if (isVoicemailTranscriptionEnabled() && !isLegacyVoicemailUser()) { + if (isVoicemailTranscriptionAvailable() && !isLegacyVoicemailUser()) { LogUtil.i( "VoicemailTosMessageCreator.shouldShowTos", "showing TOS for Google transcription users"); return true; @@ -203,7 +203,7 @@ public class VoicemailTosMessageCreator { return false; } - if (isVoicemailTranscriptionEnabled()) { + if (isVoicemailTranscriptionAvailable()) { LogUtil.i( "VoicemailTosMessageCreator.shouldShowPromo", "showing promo for Google transcription users"); @@ -227,9 +227,10 @@ public class VoicemailTosMessageCreator { } } - private boolean isVoicemailTranscriptionEnabled() { + private boolean isVoicemailTranscriptionAvailable() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O - && ConfigProviderBindings.get(context).getBoolean("voicemail_transcription_enabled", false); + && ConfigProviderBindings.get(context) + .getBoolean("voicemail_transcription_available", false); } private void showDeclineTosDialog(final PhoneAccountHandle handle) { @@ -407,7 +408,7 @@ public class VoicemailTosMessageCreator { } private CharSequence getNewUserDialerTos() { - if (!isVoicemailTranscriptionEnabled()) { + if (!isVoicemailTranscriptionAvailable()) { return ""; } @@ -416,7 +417,7 @@ public class VoicemailTosMessageCreator { } private CharSequence getExistingUserDialerTos() { - if (!isVoicemailTranscriptionEnabled()) { + if (!isVoicemailTranscriptionAvailable()) { return ""; } -- cgit v1.2.3