diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2011-02-03 13:17:49 -0800 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2011-02-03 13:17:49 -0800 |
commit | 4b8ad9effd95508e9966b8a3a355f0a948558ae2 (patch) | |
tree | ca366320f4a66b7b2f04e071e931f31e5f4c9a5f /telephony | |
parent | 8226140ccadbc8e0bdd093f8bab0a5292b9224e3 (diff) | |
parent | 2703b84caabe7b4fb7f6c08bf7463a89b0a3169c (diff) | |
download | frameworks_base-4b8ad9effd95508e9966b8a3a355f0a948558ae2.zip frameworks_base-4b8ad9effd95508e9966b8a3a355f0a948558ae2.tar.gz frameworks_base-4b8ad9effd95508e9966b8a3a355f0a948558ae2.tar.bz2 |
Merge from gingerbread
Change-Id: Id0509272ef8382fb0004f4d38bbba744e3487a8c
Diffstat (limited to 'telephony')
-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 40ee0b0..fcdf83b 100644..100755 --- a/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java @@ -23,6 +23,7 @@ import android.content.Intent; import android.os.AsyncResult; import android.os.Message; import android.os.SystemProperties; +import android.provider.Telephony.Sms; import android.provider.Telephony.Sms.Intents; import android.telephony.ServiceState; import android.telephony.SmsCbMessage; @@ -68,13 +69,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)); |