summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2011-02-03 12:41:49 -0800
committerJean-Baptiste Queru <jbq@google.com>2011-02-03 12:41:51 -0800
commitee4c17eec30b270f9a91cc92b40fc56435a59027 (patch)
tree4a519200d423479496b89ed902e54371d58eda2b
parentca69a6340610bfd7e830ff9be64a74085aea037c (diff)
parent2703b84caabe7b4fb7f6c08bf7463a89b0a3169c (diff)
downloadbase-ee4c17eec30b270f9a91cc92b40fc56435a59027.tar.gz
Merge from open-source gingerbread
Change-Id: I63e8abc1b8d6db05dfce178ae736d8d0586f6c52
-rwxr-xr-x[-rw-r--r--]core/java/android/provider/Telephony.java4
-rwxr-xr-x[-rw-r--r--]telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java7
2 files changed, 8 insertions, 3 deletions
diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java
index 6d8bd9ba573c..940bd2457d5a 100644..100755
--- a/core/java/android/provider/Telephony.java
+++ b/core/java/android/provider/Telephony.java
@@ -114,8 +114,8 @@ public final class Telephony {
public static final int STATUS_NONE = -1;
public static final int STATUS_COMPLETE = 0;
- public static final int STATUS_PENDING = 64;
- public static final int STATUS_FAILED = 128;
+ public static final int STATUS_PENDING = 32;
+ public static final int STATUS_FAILED = 64;
/**
* The subject of the message, if present
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java b/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java
index 3079a64086c7..49fa5daa05f3 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));