Hide APN prefs if platform APIs are used
The APN prefs is available if legacy APIs are used with local APN db only. Test: Manual Change-Id: I5883dcb2c406acc601787edd02e0d3272732e6d7 Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
This commit is contained in:
@@ -135,13 +135,13 @@ public class MmsManager {
|
||||
*/
|
||||
public static void sendMultimediaMessage(int subId, Context context, Uri contentUri,
|
||||
String locationUrl, PendingIntent sentIntent) {
|
||||
if (Utils.hasMmsApi() && !sForceLegacyMms) {
|
||||
if (shouldUseLegacyMms()) {
|
||||
MmsService.startRequest(context, new SendRequest(locationUrl, contentUri, sentIntent));
|
||||
} else {
|
||||
subId = Utils.getEffectiveSubscriptionId(subId);
|
||||
final SmsManager smsManager = Utils.getSmsManager(subId);
|
||||
smsManager.sendMultimediaMessage(context, contentUri, locationUrl,
|
||||
getConfigOverrides(subId), sentIntent);
|
||||
} else {
|
||||
MmsService.startRequest(context, new SendRequest(locationUrl, contentUri, sentIntent));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,17 +157,26 @@ public class MmsManager {
|
||||
*/
|
||||
public static void downloadMultimediaMessage(int subId, Context context, String locationUrl,
|
||||
Uri contentUri, PendingIntent downloadedIntent) {
|
||||
if (Utils.hasMmsApi() && !sForceLegacyMms) {
|
||||
if (shouldUseLegacyMms()) {
|
||||
MmsService.startRequest(context,
|
||||
new DownloadRequest(locationUrl, contentUri, downloadedIntent));
|
||||
} else {
|
||||
subId = Utils.getEffectiveSubscriptionId(subId);
|
||||
final SmsManager smsManager = Utils.getSmsManager(subId);
|
||||
smsManager.downloadMultimediaMessage(context, locationUrl, contentUri,
|
||||
getConfigOverrides(subId), downloadedIntent);
|
||||
} else {
|
||||
MmsService.startRequest(context,
|
||||
new DownloadRequest(locationUrl, contentUri, downloadedIntent));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if we should use legacy APIs for MMS.
|
||||
*
|
||||
* @return true if forced to use legacy APIs or platform doesn't supports MMS APIs.
|
||||
*/
|
||||
public static boolean shouldUseLegacyMms() {
|
||||
return sForceLegacyMms || !Utils.hasMmsApi();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get carrier configuration values overrides when platform MMS API is called.
|
||||
* We only need to compute this if customized carrier config values loader or
|
||||
|
||||
Reference in New Issue
Block a user