Merge from gingerbread
Change-Id: Id0509272ef8382fb0004f4d38bbba744e3487a8c
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_NONE = -1;
|
||||||
public static final int STATUS_COMPLETE = 0;
|
public static final int STATUS_COMPLETE = 0;
|
||||||
public static final int STATUS_PENDING = 64;
|
public static final int STATUS_PENDING = 32;
|
||||||
public static final int STATUS_FAILED = 128;
|
public static final int STATUS_FAILED = 64;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The subject of the message, if present
|
* 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.AsyncResult;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.os.SystemProperties;
|
import android.os.SystemProperties;
|
||||||
|
import android.provider.Telephony.Sms;
|
||||||
import android.provider.Telephony.Sms.Intents;
|
import android.provider.Telephony.Sms.Intents;
|
||||||
import android.telephony.ServiceState;
|
import android.telephony.ServiceState;
|
||||||
import android.telephony.SmsCbMessage;
|
import android.telephony.SmsCbMessage;
|
||||||
@@ -68,13 +69,17 @@ final class GsmSMSDispatcher extends SMSDispatcher {
|
|||||||
String pduString = (String) ar.result;
|
String pduString = (String) ar.result;
|
||||||
SmsMessage sms = SmsMessage.newFromCDS(pduString);
|
SmsMessage sms = SmsMessage.newFromCDS(pduString);
|
||||||
|
|
||||||
|
int tpStatus = sms.getStatus();
|
||||||
|
|
||||||
if (sms != null) {
|
if (sms != null) {
|
||||||
int messageRef = sms.messageRef;
|
int messageRef = sms.messageRef;
|
||||||
for (int i = 0, count = deliveryPendingList.size(); i < count; i++) {
|
for (int i = 0, count = deliveryPendingList.size(); i < count; i++) {
|
||||||
SmsTracker tracker = deliveryPendingList.get(i);
|
SmsTracker tracker = deliveryPendingList.get(i);
|
||||||
if (tracker.mMessageRef == messageRef) {
|
if (tracker.mMessageRef == messageRef) {
|
||||||
// Found it. Remove from list and broadcast.
|
// 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;
|
PendingIntent intent = tracker.mDeliveryIntent;
|
||||||
Intent fillIn = new Intent();
|
Intent fillIn = new Intent();
|
||||||
fillIn.putExtra("pdu", IccUtils.hexStringToBytes(pduString));
|
fillIn.putExtra("pdu", IccUtils.hexStringToBytes(pduString));
|
||||||
|
|||||||
Reference in New Issue
Block a user