From 32319dd852709b975e53360f479634e43db4d224 Mon Sep 17 00:00:00 2001 From: Jake Hamby Date: Mon, 10 Oct 2011 16:56:58 -0700 Subject: [PATCH] Add "format" extra to SMS delivery report intents. The MMS app was updated for multiple SMS dispatcher support, passing the "format" extra into SmsMessage.createFromPdu() so that the PDU is interpreted as the correct format (3GPP or 3GPP2). This change adds the "format" extra to the intents that are sent for SMS delivery reports. The MMS app is already expecting this extra, so this change fixes a NPE that was introduced with the last change. Bug: 5434052 Change-Id: I38b97f166c78d246d721ca1db8a4a18a2c6529bd --- .../com/android/internal/telephony/cdma/CdmaSMSDispatcher.java | 1 + .../com/android/internal/telephony/gsm/GsmSMSDispatcher.java | 1 + 2 files changed, 2 insertions(+) diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java b/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java index dded39e1a6a37..fe41e7e61b0c0 100755 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java @@ -88,6 +88,7 @@ final class CdmaSMSDispatcher extends SMSDispatcher { PendingIntent intent = tracker.mDeliveryIntent; Intent fillIn = new Intent(); fillIn.putExtra("pdu", sms.getPdu()); + fillIn.putExtra("format", android.telephony.SmsMessage.FORMAT_3GPP2); try { intent.send(mContext, Activity.RESULT_OK, fillIn); } catch (CanceledException ex) {} diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java b/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java index 4e1cc9afd13f6..c1553d831c9bf 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java @@ -122,6 +122,7 @@ public final class GsmSMSDispatcher extends SMSDispatcher { PendingIntent intent = tracker.mDeliveryIntent; Intent fillIn = new Intent(); fillIn.putExtra("pdu", IccUtils.hexStringToBytes(pduString)); + fillIn.putExtra("format", android.telephony.SmsMessage.FORMAT_3GPP); try { intent.send(mContext, Activity.RESULT_OK, fillIn); } catch (CanceledException ex) {}