diff options
author | Taesu Lee <taesu82.lee@samsung.com> | 2017-01-17 12:17:54 +0900 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2019-09-15 01:37:54 +0300 |
commit | 10e57b682d5c88ce36dbe2e03e2775dc999489ac (patch) | |
tree | 4998665a42e7c312da9a70af457564fb06600e84 /src/com/android/messaging | |
parent | bcc4f5f32f0cce3f2cc159586c5180b81616987f (diff) | |
download | packages_apps_Messaging-10e57b682d5c88ce36dbe2e03e2775dc999489ac.tar.gz packages_apps_Messaging-10e57b682d5c88ce36dbe2e03e2775dc999489ac.tar.bz2 packages_apps_Messaging-10e57b682d5c88ce36dbe2e03e2775dc999489ac.zip |
Fix X-Mms-Transaction-ID of M-Acknowledge.ind
X-Mms-Transaction-ID of M-Acknowledge.ind should be set as the
corresponding M-Retrieve.conf's transaction ID instead of
M-Notification.ind's one.
(OMA-TS-MMS_ENC-V1_3-20110913-A)
Test: Manual
Change-Id: I250f32b93cdfbed815206543df5486efa4df18eb
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Diffstat (limited to 'src/com/android/messaging')
-rw-r--r-- | src/com/android/messaging/sms/MmsUtils.java | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/com/android/messaging/sms/MmsUtils.java b/src/com/android/messaging/sms/MmsUtils.java index 9c4c2d5..2de6678 100644 --- a/src/com/android/messaging/sms/MmsUtils.java +++ b/src/com/android/messaging/sms/MmsUtils.java @@ -1915,7 +1915,7 @@ public class MmsUtils { final String transactionId, final String contentLocation, final boolean autoDownload, final long receivedTimestampInSeconds, final RetrieveConf retrieveConf) { - final byte[] transactionIdBytes = stringToBytes(transactionId, "UTF-8"); + final byte[] notificationTransactionId = stringToBytes(transactionId, "UTF-8"); Uri messageUri = null; int status = MMS_REQUEST_MANUAL_RETRY; int retrieveStatus = PDU_HEADER_VALUE_UNDEFINED; @@ -1940,10 +1940,15 @@ public class MmsUtils { if (status == MMS_REQUEST_SUCCEEDED) { // Send response of the notification if (autoDownload) { - sendNotifyResponseForMmsDownload(context, subId, transactionIdBytes, - contentLocation, PduHeaders.STATUS_RETRIEVED); + sendNotifyResponseForMmsDownload( + context, + subId, + notificationTransactionId, + contentLocation, + PduHeaders.STATUS_RETRIEVED); } else { - sendAcknowledgeForMmsDownload(context, subId, transactionIdBytes, contentLocation); + sendAcknowledgeForMmsDownload( + context, subId, retrieveConf.getTransactionId(), contentLocation); } // Insert downloaded message into telephony @@ -1954,8 +1959,12 @@ public class MmsUtils { // For a retry do nothing } else if (status == MMS_REQUEST_MANUAL_RETRY && autoDownload) { // Failure from autodownload - just treat like manual download - sendNotifyResponseForMmsDownload(context, subId, transactionIdBytes, - contentLocation, PduHeaders.STATUS_DEFERRED); + sendNotifyResponseForMmsDownload( + context, + subId, + notificationTransactionId, + contentLocation, + PduHeaders.STATUS_DEFERRED); } return new StatusPlusUri(status, retrieveStatus, messageUri); } |