[automerge] Make sure mms proxy is hostname 2p: 49dfa28259

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17643666

Bug: 226279832
Change-Id: I583dff338a3f8e88a4457dcb2d88a7ec9afb3671
This commit is contained in:
Presubmit Automerger Backend
2022-04-07 21:04:35 +00:00

View File

@@ -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);
}