summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/com/android/dialer/app/voicemail/error/VoicemailTosMessageCreator.java4
-rw-r--r--java/com/android/voicemail/impl/transcribe/TranscriptionConfigProvider.java4
2 files changed, 6 insertions, 2 deletions
diff --git a/java/com/android/dialer/app/voicemail/error/VoicemailTosMessageCreator.java b/java/com/android/dialer/app/voicemail/error/VoicemailTosMessageCreator.java
index 9b3bbd08e..f5ea95d35 100644
--- a/java/com/android/dialer/app/voicemail/error/VoicemailTosMessageCreator.java
+++ b/java/com/android/dialer/app/voicemail/error/VoicemailTosMessageCreator.java
@@ -22,6 +22,7 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
+import android.os.Build;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import android.telecom.PhoneAccountHandle;
@@ -139,7 +140,8 @@ public class VoicemailTosMessageCreator {
}
private boolean isVoicemailTranscriptionEnabled() {
- return ConfigProviderBindings.get(context).getBoolean("voicemail_transcription_enabled", false);
+ return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
+ && ConfigProviderBindings.get(context).getBoolean("voicemail_transcription_enabled", false);
}
private void showDeclineTosDialog(final PhoneAccountHandle handle) {
diff --git a/java/com/android/voicemail/impl/transcribe/TranscriptionConfigProvider.java b/java/com/android/voicemail/impl/transcribe/TranscriptionConfigProvider.java
index 83f04dab8..4bb9a261b 100644
--- a/java/com/android/voicemail/impl/transcribe/TranscriptionConfigProvider.java
+++ b/java/com/android/voicemail/impl/transcribe/TranscriptionConfigProvider.java
@@ -16,6 +16,7 @@
package com.android.voicemail.impl.transcribe;
import android.content.Context;
+import android.os.Build;
import com.android.dialer.configprovider.ConfigProviderBindings;
/** Provides configuration values needed to connect to the transcription server. */
@@ -27,7 +28,8 @@ public class TranscriptionConfigProvider {
}
public boolean isVoicemailTranscriptionEnabled() {
- return ConfigProviderBindings.get(context).getBoolean("voicemail_transcription_enabled", false);
+ return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
+ && ConfigProviderBindings.get(context).getBoolean("voicemail_transcription_enabled", false);
}
public String getServerAddress() {