diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2011-02-03 12:17:47 -0800 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2011-02-03 12:17:47 -0800 |
commit | 2703b84caabe7b4fb7f6c08bf7463a89b0a3169c (patch) | |
tree | 732ae5f456961be2de3064ef3aadd1a132451a01 /telephony/java | |
parent | 049b172b48663266f8aed02595fcb92e20d192c2 (diff) | |
parent | c5996b9969b241dfe647c7de4d7995c6e848d1db (diff) | |
download | frameworks_base-2703b84caabe7b4fb7f6c08bf7463a89b0a3169c.zip frameworks_base-2703b84caabe7b4fb7f6c08bf7463a89b0a3169c.tar.gz frameworks_base-2703b84caabe7b4fb7f6c08bf7463a89b0a3169c.tar.bz2 |
Merge "Fix delivery report error with PENDING status in SMS" into gingerbread
Diffstat (limited to 'telephony/java')
-rwxr-xr-x[-rw-r--r--] | telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java b/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java index 3079a64..49fa5da 100644..100755 --- a/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java @@ -22,6 +22,7 @@ import android.app.PendingIntent.CanceledException; import android.content.Intent; import android.os.AsyncResult; import android.os.Message; +import android.provider.Telephony.Sms; import android.provider.Telephony.Sms.Intents; import android.telephony.ServiceState; import android.util.Config; @@ -60,13 +61,17 @@ final class GsmSMSDispatcher extends SMSDispatcher { String pduString = (String) ar.result; SmsMessage sms = SmsMessage.newFromCDS(pduString); + int tpStatus = sms.getStatus(); + if (sms != null) { int messageRef = sms.messageRef; for (int i = 0, count = deliveryPendingList.size(); i < count; i++) { SmsTracker tracker = deliveryPendingList.get(i); if (tracker.mMessageRef == messageRef) { // Found it. Remove from list and broadcast. - deliveryPendingList.remove(i); + if(tpStatus >= Sms.STATUS_FAILED || tpStatus < Sms.STATUS_PENDING ) { + deliveryPendingList.remove(i); + } PendingIntent intent = tracker.mDeliveryIntent; Intent fillIn = new Intent(); fillIn.putExtra("pdu", IccUtils.hexStringToBytes(pduString)); |