Merge "skip permission check for TelephonyManager API getMmsUserAgent" into qt-dev
am: 924c6eb536
Change-Id: Ibb34ee3980b10e5791c0239676d03c3b4304dfd8
This commit is contained in:
@@ -5367,18 +5367,30 @@ public class TelephonyManager {
|
|||||||
* Returns the MMS user agent.
|
* Returns the MMS user agent.
|
||||||
*/
|
*/
|
||||||
public String getMmsUserAgent() {
|
public String getMmsUserAgent() {
|
||||||
if (mContext == null) return null;
|
try {
|
||||||
return SubscriptionManager.getResourcesForSubId(mContext, getSubId()).getString(
|
ITelephony telephony = getITelephony();
|
||||||
com.android.internal.R.string.config_mms_user_agent);
|
if (telephony != null) {
|
||||||
|
return telephony.getMmsUserAgent(getSubId());
|
||||||
|
}
|
||||||
|
} catch (RemoteException ex) {
|
||||||
|
} catch (NullPointerException ex) {
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the MMS user agent profile URL.
|
* Returns the MMS user agent profile URL.
|
||||||
*/
|
*/
|
||||||
public String getMmsUAProfUrl() {
|
public String getMmsUAProfUrl() {
|
||||||
if (mContext == null) return null;
|
try {
|
||||||
return SubscriptionManager.getResourcesForSubId(mContext, getSubId()).getString(
|
ITelephony telephony = getITelephony();
|
||||||
com.android.internal.R.string.config_mms_user_agent_profile_url);
|
if (telephony != null) {
|
||||||
|
return telephony.getMmsUAProfUrl(getSubId());
|
||||||
|
}
|
||||||
|
} catch (RemoteException ex) {
|
||||||
|
} catch (NullPointerException ex) {
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1986,4 +1986,14 @@ interface ITelephony {
|
|||||||
* outgoing SmsManager operation.
|
* outgoing SmsManager operation.
|
||||||
*/
|
*/
|
||||||
oneway void enqueueSmsPickResult(String callingPackage, IIntegerConsumer subIdResult);
|
oneway void enqueueSmsPickResult(String callingPackage, IIntegerConsumer subIdResult);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the MMS user agent.
|
||||||
|
*/
|
||||||
|
String getMmsUserAgent(int subId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the MMS user agent profile URL.
|
||||||
|
*/
|
||||||
|
String getMmsUAProfUrl(int subId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user