Get UA and UAProfUrl from Carrier Config First
Some carriers require customized UA and UAProfUrl in a specified
format, which is different from the default configuration of OEM.
Therefore, first get the MMS User Agent from Carrier Config.
Signed-off-by: Guoqiang.Qiu <guoqiang.qiu@tcl.com>
Change-Id: I70395611d8578a8aff0af183fed600abde7407ef
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 99113bf..c6723a4 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -8307,6 +8307,11 @@
//TODO investigate if this API should require proper permission check in R b/133791609
final long identity = Binder.clearCallingIdentity();
try {
+ String carrierUAProfUrl = mApp.getCarrierConfigForSubId(subId).getString(
+ CarrierConfigManager.KEY_MMS_UA_PROF_URL_STRING);
+ if (!TextUtils.isEmpty(carrierUAProfUrl)) {
+ return carrierUAProfUrl;
+ }
return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
.getString(com.android.internal.R.string.config_mms_user_agent_profile_url);
} finally {
@@ -8319,6 +8324,11 @@
//TODO investigate if this API should require proper permission check in R b/133791609
final long identity = Binder.clearCallingIdentity();
try {
+ String carrierUserAgent = mApp.getCarrierConfigForSubId(subId).getString(
+ CarrierConfigManager.KEY_MMS_USER_AGENT_STRING);
+ if (!TextUtils.isEmpty(carrierUserAgent)) {
+ return carrierUserAgent;
+ }
return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
.getString(com.android.internal.R.string.config_mms_user_agent);
} finally {