summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2011-02-03 13:17:49 -0800
committerJean-Baptiste Queru <jbq@google.com>2011-02-03 13:17:49 -0800
commit4b8ad9effd95508e9966b8a3a355f0a948558ae2 (patch)
treeca366320f4a66b7b2f04e071e931f31e5f4c9a5f /telephony
parent8226140ccadbc8e0bdd093f8bab0a5292b9224e3 (diff)
parent2703b84caabe7b4fb7f6c08bf7463a89b0a3169c (diff)
downloadframeworks_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.java7
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));