Merge "Extract hostname if mMmsProxyAddress starts with http." into tm-qpr-dev am: 366cdaf821 am: e2cf2f44e6

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

Change-Id: I219849faf2d2334d72a5673a3a453b5a10855403
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Aishwarya Mallampati
2022-06-14 17:05:02 +00:00
committed by Automerger Merge Worker

View File

@@ -2190,11 +2190,10 @@ public class ApnSetting implements Parcelable {
}
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;
Log.wtf(LOG_TAG,"mms proxy(" + mMmsProxyAddress
+ ") should be a hostname, not a url");
Uri mMmsProxyAddressUri = Uri.parse(mMmsProxyAddress);
mMmsProxyAddress = mMmsProxyAddressUri.getHost();
}
return new ApnSetting(this);
}