diff options
Diffstat (limited to 'java/com/android/voicemail/impl')
3 files changed, 6 insertions, 5 deletions
diff --git a/java/com/android/voicemail/impl/VoicemailClientImpl.java b/java/com/android/voicemail/impl/VoicemailClientImpl.java index 60fc80692..75d6dfc66 100644 --- a/java/com/android/voicemail/impl/VoicemailClientImpl.java +++ b/java/com/android/voicemail/impl/VoicemailClientImpl.java @@ -130,7 +130,7 @@ public class VoicemailClientImpl implements VoicemailClient { } TranscriptionConfigProvider provider = new TranscriptionConfigProvider(context); - if (!provider.isVoicemailTranscriptionEnabled()) { + if (!provider.isVoicemailTranscriptionAvailable()) { LogUtil.i( "VoicemailClientImpl.isVoicemailTranscriptionAvailable", "feature disabled by config"); return false; diff --git a/java/com/android/voicemail/impl/transcribe/TranscriptionConfigProvider.java b/java/com/android/voicemail/impl/transcribe/TranscriptionConfigProvider.java index 3d1755b64..54a1ae4d4 100644 --- a/java/com/android/voicemail/impl/transcribe/TranscriptionConfigProvider.java +++ b/java/com/android/voicemail/impl/transcribe/TranscriptionConfigProvider.java @@ -28,9 +28,10 @@ public class TranscriptionConfigProvider { this.context = context; } - public boolean isVoicemailTranscriptionEnabled() { + public 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); } public String getServerAddress() { diff --git a/java/com/android/voicemail/impl/transcribe/TranscriptionService.java b/java/com/android/voicemail/impl/transcribe/TranscriptionService.java index a19ab6208..0f5300358 100644 --- a/java/com/android/voicemail/impl/transcribe/TranscriptionService.java +++ b/java/com/android/voicemail/impl/transcribe/TranscriptionService.java @@ -142,8 +142,8 @@ public class TranscriptionService extends JobService { public boolean onStartJob(JobParameters params) { Assert.isMainThread(); LogUtil.enterBlock("TranscriptionService.onStartJob"); - if (!getConfigProvider().isVoicemailTranscriptionEnabled()) { - LogUtil.i("TranscriptionService.onStartJob", "transcription not enabled, exiting."); + if (!getConfigProvider().isVoicemailTranscriptionAvailable()) { + LogUtil.i("TranscriptionService.onStartJob", "transcription not available, exiting."); return false; } else if (TextUtils.isEmpty(getConfigProvider().getServerAddress())) { LogUtil.i("TranscriptionService.onStartJob", "transcription server not configured, exiting."); |