From 512ae93076377d771979f86e59913a85211169a0 Mon Sep 17 00:00:00 2001 From: twyen Date: Mon, 2 Apr 2018 14:45:57 -0700 Subject: Disable transcrption downloads for T-Mobile. In this CL, the client will stop treating text/* attachments as transcrptions for T-mobile. Transcriptions are already disabled by the device type sent during provisioning so this will not affect any existing functionality. This prevents other data on the server showing up as transcription. Bug: 77342321 Test: TAP, exact behavior not testable. PiperOrigin-RevId: 191350836 Change-Id: I758996c3fef75ece7cecf0f7a0b4df7ace970d80 --- .../voicemail/impl/OmtpVvmCarrierConfigHelper.java | 10 +++++++ .../android/voicemail/impl/imap/ImapHelper.java | 2 +- .../android/voicemail/impl/res/xml/vvm_config.xml | 31 ++++++++++++---------- 3 files changed, 28 insertions(+), 15 deletions(-) (limited to 'java/com/android') diff --git a/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java b/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java index 8896bc740..032153d77 100644 --- a/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java +++ b/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java @@ -88,6 +88,7 @@ public class OmtpVvmCarrierConfigHelper { "vvm_disabled_capabilities_string_array"; public static final String KEY_VVM_CLIENT_PREFIX_STRING = "vvm_client_prefix_string"; + private static final String KEY_IGNORE_TRANSCRIPTION_BOOL = "vvm_ignore_transcription"; @Nullable private static PersistableBundle overrideConfigForTest; @@ -517,4 +518,13 @@ public class OmtpVvmCarrierConfigHelper { } return false; } + + /** + * Suppress the behavior of treating any text attachment with MIME "text/*" as transcription, + * default to false. + */ + public boolean ignoreTranscription() { + Assert.checkArgument(isValid()); + return (boolean) getValue(KEY_IGNORE_TRANSCRIPTION_BOOL, false); + } } diff --git a/java/com/android/voicemail/impl/imap/ImapHelper.java b/java/com/android/voicemail/impl/imap/ImapHelper.java index 1f04edbef..02453f7da 100644 --- a/java/com/android/voicemail/impl/imap/ImapHelper.java +++ b/java/com/android/voicemail/impl/imap/ImapHelper.java @@ -571,7 +571,7 @@ public class ImapHelper implements Closeable { if (bodyPartMimeType.startsWith("audio/")) { messageStructureWrapper.messageStructure = message; - } else if (bodyPartMimeType.startsWith("text/")) { + } else if (!config.ignoreTranscription() && bodyPartMimeType.startsWith("text/")) { messageStructureWrapper.transcriptionBodyPart = bodyPart; } else { VvmLog.v(TAG, "Unknown bodyPart MIME: " + bodyPartMimeType); diff --git a/java/com/android/voicemail/impl/res/xml/vvm_config.xml b/java/com/android/voicemail/impl/res/xml/vvm_config.xml index 4c5efcc1c..87d37b559 100644 --- a/java/com/android/voicemail/impl/res/xml/vvm_config.xml +++ b/java/com/android/voicemail/impl/res/xml/vvm_config.xml @@ -66,16 +66,16 @@ + name="vvm_port_number_int" + value="20481"/> 21101 vvm_type_omtp + name="vvm_cellular_data_required_bool" + value="true"/> @@ -105,11 +105,11 @@ + name="vvm_port_number_int" + value="1808"/> + name="vvm_ssl_port_number_int" + value="993"/> 122 @@ -120,6 +120,9 @@ true + @@ -198,17 +201,17 @@ + name="vvm_port_number_int" + value="0"/> 900080006200 vvm_type_vvm3 //VZWVVM + name="vvm_cellular_data_required_bool" + value="true"/> + name="vvm_legacy_mode_enabled_bool" + value="true"/> https://mobile.vzw.com/VMGIMS/VMServices -- cgit v1.2.3