I think the code is missing is the following, that exists in the previous version 2:
grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/1.6_r2/com/android/internal/telephony/IccSmsInterfaceManager.java#IccSmsInterfaceManager.sendRawPdu(byte%5B%5D%2Cbyte%5B%5D%2Candroid.app.PendingIntent%2Candroid.app.PendingIntent[/url])
/**
* Send a Raw PDU SMS
*
* @param smsc the SMSC to send the message through, or NULL for the
* defatult SMSC
* @param pdu the raw PDU to send
* @param sentIntent if not NULL this <code>Intent</code> is
* broadcast when the message is sucessfully sent, or failed.
* The result code will be <code>Activity.RESULT_OK<code> for success,
* or one of these errors:
* <code>RESULT_ERROR_GENERIC_FAILURE</code>
* <code>RESULT_ERROR_RADIO_OFF</code>
* <code>RESULT_ERROR_NULL_PDU</code>.
* @param deliveryIntent if not NULL this <code>Intent</code> is
* broadcast when the message is delivered to the recipient. The
* raw pdu of the status report is in the extended data ("pdu").
*/
public void sendRawPdu(byte[] smsc, byte[] pdu, PendingIntent sentIntent,
PendingIntent deliveryIntent) {
Context context = mPhone.getContext();
context.enforceCallingPermission(
"android.permission.SEND_SMS",
"Sending SMS message");
if (DBG) log("sendRawPdu: smsc=" + smsc +
" pdu="+ pdu + " sentIntent" + sentIntent +
" deliveryIntent" + deliveryIntent);
mDispatcher.sendRawPdu(smsc, pdu, sentIntent, deliveryIntent);
}
create SmsRawData lists from all sms record byte[] Use null to indicate "free" record
Parameters:
messages List of message records from EF_SMS.
Returns:
SmsRawData list of all in-used records
121
122 protected ArrayList<SmsRawData> buildValidRawData(ArrayList<byte[]> messages) {
123 int count = messages.size();
124 ArrayList<SmsRawData> ret;
125
126 ret = new ArrayList<SmsRawData>(count);
127
128 for (int i = 0; i < count; i++) {
129 byte[] ba = messages.get(i);
130 if (ba[0] == STATUS_ON_ICC_FREE) {
131 ret.add(null);
132 } else {
133 ret.add(new SmsRawData(messages.get(i)));
134 }
135 }
136
137 return ret;
138 }
Generates an EF_SMS record from status and raw PDU.
Parameters:
status Message status. See TS 51.011 10.5.3.
pdu Raw message PDU.
Returns:
byte array for the record.
146
147 protected byte[] makeSmsRecordData(int status, byte[] pdu) {
148 byte[] data = new byte[IccConstants.SMS_RECORD_LENGTH];
149
150 // Status bits for this record. See TS 51.011 10.5.3
151 data[0] = (byte)(status & 7);
152
153 System.arraycopy(pdu, 0, data, 1, pdu.length);
154
155 // Pad out with 0xFF's.
156 for (int j = pdu.length+1; j < IccConstants.SMS_RECORD_LENGTH; j++) {
157 data[j] = -1;
158 }
159
160 return data;
161 }
162
163 protected abstract void log(String msg);
164
165}
Compared with the 2.2.1_r1
grepcode.com/file_/repository.grepcode.com/java/ext/com.google.android/android/1.6_r2/com/android/internal/telephony/IccSmsInterfaceManager.java/?v=diff&id2=2.2.1_r1