Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 512ae930 authored by twyen's avatar twyen Committed by Copybara-Service
Browse files

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
parent 8b25da85
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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);
  }
}
+1 −1
Original line number Diff line number Diff line
@@ -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);
+17 −14
Original line number Diff line number Diff line
@@ -120,6 +120,9 @@
      <item value="AUTH=DIGEST-MD5"/>
    </string-array>
    <string name="vvm_carrier_allows_ott_transcription_string">true</string>
    <boolean
        name="vvm_ignore_transcription"
        value="false"/>
  </pbundle_as_map>

  <pbundle_as_map>