File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
core/java/android/provider
telephony/java/com/android/internal/telephony/gsm Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,8 @@ public interface TextBasedSmsColumns {
114114
115115 public static final int STATUS_NONE = -1 ;
116116 public static final int STATUS_COMPLETE = 0 ;
117- public static final int STATUS_PENDING = 64 ;
118- public static final int STATUS_FAILED = 128 ;
117+ public static final int STATUS_PENDING = 32 ;
118+ public static final int STATUS_FAILED = 64 ;
119119
120120 /**
121121 * The subject of the message, if present
Original file line number Diff line number Diff line change 2222import android .content .Intent ;
2323import android .os .AsyncResult ;
2424import android .os .Message ;
25+ import android .provider .Telephony .Sms ;
2526import android .provider .Telephony .Sms .Intents ;
2627import android .telephony .ServiceState ;
2728import android .util .Config ;
@@ -60,13 +61,17 @@ protected void handleStatusReport(AsyncResult ar) {
6061 String pduString = (String ) ar .result ;
6162 SmsMessage sms = SmsMessage .newFromCDS (pduString );
6263
64+ int tpStatus = sms .getStatus ();
65+
6366 if (sms != null ) {
6467 int messageRef = sms .messageRef ;
6568 for (int i = 0 , count = deliveryPendingList .size (); i < count ; i ++) {
6669 SmsTracker tracker = deliveryPendingList .get (i );
6770 if (tracker .mMessageRef == messageRef ) {
6871 // Found it. Remove from list and broadcast.
69- deliveryPendingList .remove (i );
72+ if (tpStatus >= Sms .STATUS_FAILED || tpStatus < Sms .STATUS_PENDING ) {
73+ deliveryPendingList .remove (i );
74+ }
7075 PendingIntent intent = tracker .mDeliveryIntent ;
7176 Intent fillIn = new Intent ();
7277 fillIn .putExtra ("pdu" , IccUtils .hexStringToBytes (pduString ));
You can’t perform that action at this time.
0 commit comments