Merge ee4c17ee from gingerbread
Change-Id: Ide109e517fb7610d60f31ba6aa99fe665b59d690
This commit is contained in:
4
core/java/android/provider/Telephony.java
Normal file → Executable file
4
core/java/android/provider/Telephony.java
Normal file → Executable file
@@ -115,8 +115,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
|
||||
|
||||
7
telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java
Normal file → Executable file
7
telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java
Normal file → Executable file
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user