[automerger skipped] Merge Android 12 am: 4aa283fea9 -s ours am: ab0c80d400 -s ours am: ac671c07e5 -s ours am: 2045c4cad5 -s ours am: f3cc3018ed -s ours
am skip reason: Merged-In If0a2b824f3f1d1e1052eda860e2a58106406118b with SHA-1 e5d76bb306 is already in history
Original change: https://android-review.googlesource.com/c/platform/packages/services/Mms/+/1847390
Change-Id: I5281fba010c150d6bb0b4da204ef7a3cfb3ee579
diff --git a/src/com/android/mms/service/MmsService.java b/src/com/android/mms/service/MmsService.java
index 0394379..c752120 100644
--- a/src/com/android/mms/service/MmsService.java
+++ b/src/com/android/mms/service/MmsService.java
@@ -214,7 +214,7 @@
// Make sure the subId is correct
if (!SubscriptionManager.isValidSubscriptionId(subId)) {
LogUtil.e("Invalid subId " + subId);
- sendErrorInPendingIntent(sentIntent, SmsManager.MMS_ERROR_NO_DATA_NETWORK);
+ sendErrorInPendingIntent(sentIntent, SmsManager.MMS_ERROR_INVALID_SUBSCRIPTION_ID);
return;
}
if (subId == SubscriptionManager.DEFAULT_SUBSCRIPTION_ID) {
@@ -223,7 +223,7 @@
// Make sure the subId is active
if (!isActiveSubId(subId)) {
- sendErrorInPendingIntent(sentIntent, SmsManager.MMS_ERROR_NO_DATA_NETWORK);
+ sendErrorInPendingIntent(sentIntent, SmsManager.MMS_ERROR_INACTIVE_SUBSCRIPTION);
return;
}
@@ -291,7 +291,8 @@
// Make sure the subId is correct
if (!SubscriptionManager.isValidSubscriptionId(subId)) {
LogUtil.e("Invalid subId " + subId);
- sendErrorInPendingIntent(downloadedIntent, SmsManager.MMS_ERROR_NO_DATA_NETWORK);
+ sendErrorInPendingIntent(downloadedIntent,
+ SmsManager.MMS_ERROR_INVALID_SUBSCRIPTION_ID);
return;
}
if (subId == SubscriptionManager.DEFAULT_SUBSCRIPTION_ID) {
@@ -301,8 +302,8 @@
if (!isActiveSubId(subId)) {
List<SubscriptionInfo> activeSubList = getActiveSubscriptionsInGroup(subId);
if (activeSubList.isEmpty()) {
- sendErrorInPendingIntent(
- downloadedIntent, SmsManager.MMS_ERROR_NO_DATA_NETWORK);
+ sendErrorInPendingIntent(downloadedIntent,
+ SmsManager.MMS_ERROR_INACTIVE_SUBSCRIPTION);
return;
}
@@ -356,7 +357,7 @@
// Make sure subId has MMS data
if (!getTelephonyManager(subId).isDataEnabledForApn(ApnSetting.TYPE_MMS)) {
sendSettingsIntentForFailedMms(/*isIncoming=*/ true, subId);
- sendErrorInPendingIntent(downloadedIntent, SmsManager.MMS_ERROR_NO_DATA_NETWORK);
+ sendErrorInPendingIntent(downloadedIntent, SmsManager.MMS_ERROR_DATA_DISABLED);
return;
}