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

Commit b1887b52 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "presubmit-am-e2e0a85d5c2447e486904f5bd3376c69" into tm-mainline-prod

* changes:
  [automerge] Make sure mms proxy is hostname 2p: 49dfa282
  Make sure mms proxy is hostname
parents 81a31082 6ae25b00
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.content.ContentValues;
import android.database.Cursor;
import android.hardware.radio.V1_5.ApnTypes;
import android.net.Uri;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.provider.Telephony;
@@ -2183,6 +2184,14 @@ public class ApnSetting implements Parcelable {
                || TextUtils.isEmpty(mApnName) || TextUtils.isEmpty(mEntryName)) {
                return null;
            }
            if ((mApnTypeBitmask & TYPE_MMS) != 0 && !TextUtils.isEmpty(mMmsProxyAddress)
                    && mMmsProxyAddress.startsWith("http")) {
                if (Build.IS_DEBUGGABLE) {
                    throw new IllegalArgumentException("mms proxy(" +  mMmsProxyAddress
                            + ") should be a hostname, not a url");
                }
                return null;
            }
            return new ApnSetting(this);
        }