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
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java b/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java
index dded39e..fe41e7e 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 @@
                 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 4e1cc9a..c1553d8 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 @@
                     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) {}