summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Taylor <tomtaylor@google.com>2021-06-18 13:02:37 -0700
committerTom Taylor <tomtaylor@google.com>2021-09-27 18:30:06 +0000
commit74bec54f509e914ffd7056cdaf5f6c3e46c98fb2 (patch)
tree9ee933f676eaabdd33611b3f75dbfab627b069d4
parent990bd637f1b146dd58aab6204cff1712cfc2a79b (diff)
downloadMms-74bec54f509e914ffd7056cdaf5f6c3e46c98fb2.tar.gz
Return new and more detailed connection failure result codes
Test: manually tested sending/receiving MMSs Bug: 185275986 Change-Id: I1d988331d1f09c71a0b3aec5e291f380b939a53c
-rw-r--r--src/com/android/mms/service/MmsService.java13
1 files changed, 7 insertions, 6 deletions
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 @@ public class MmsService extends Service implements MmsRequest.RequestManager {
// 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 @@ public class MmsService extends Service implements MmsRequest.RequestManager {
// 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 @@ public class MmsService extends Service implements MmsRequest.RequestManager {
// 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 @@ public class MmsService extends Service implements MmsRequest.RequestManager {
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 @@ public class MmsService extends Service implements MmsRequest.RequestManager {
// 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;
}