|
|
|
@ -16,16 +16,16 @@
|
|
|
|
|
*/
|
|
|
|
|
package org.thoughtcrime.securesms.service;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.LinkedList;
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
import android.content.Intent;
|
|
|
|
|
import android.telephony.TelephonyManager;
|
|
|
|
|
import android.util.Log;
|
|
|
|
|
|
|
|
|
|
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
|
|
|
|
import org.thoughtcrime.securesms.crypto.SessionCipher;
|
|
|
|
|
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
|
|
|
|
import org.thoughtcrime.securesms.database.MmsDatabase;
|
|
|
|
|
import org.thoughtcrime.securesms.mms.MmsSendHelper;
|
|
|
|
|
import org.thoughtcrime.securesms.mms.PngTransport;
|
|
|
|
|
import org.thoughtcrime.securesms.mms.TextTransport;
|
|
|
|
|
import org.thoughtcrime.securesms.protocol.WirePrefix;
|
|
|
|
|
import org.thoughtcrime.securesms.recipients.Recipient;
|
|
|
|
@ -33,7 +33,6 @@ import org.thoughtcrime.securesms.util.Hex;
|
|
|
|
|
|
|
|
|
|
import ws.com.google.android.mms.ContentType;
|
|
|
|
|
import ws.com.google.android.mms.MmsException;
|
|
|
|
|
import ws.com.google.android.mms.pdu.CharacterSets;
|
|
|
|
|
import ws.com.google.android.mms.pdu.EncodedStringValue;
|
|
|
|
|
import ws.com.google.android.mms.pdu.PduBody;
|
|
|
|
|
import ws.com.google.android.mms.pdu.PduComposer;
|
|
|
|
@ -42,10 +41,10 @@ import ws.com.google.android.mms.pdu.PduParser;
|
|
|
|
|
import ws.com.google.android.mms.pdu.PduPart;
|
|
|
|
|
import ws.com.google.android.mms.pdu.SendConf;
|
|
|
|
|
import ws.com.google.android.mms.pdu.SendReq;
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
import android.content.Intent;
|
|
|
|
|
import android.telephony.TelephonyManager;
|
|
|
|
|
import android.util.Log;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.LinkedList;
|
|
|
|
|
|
|
|
|
|
public class MmsSender extends MmscProcessor {
|
|
|
|
|
|
|
|
|
@ -140,7 +139,7 @@ public class MmsSender extends MmscProcessor {
|
|
|
|
|
if (number != null && number.trim().length() != 0)
|
|
|
|
|
pdu.setFrom(new EncodedStringValue(number));
|
|
|
|
|
|
|
|
|
|
byte[] response = MmsSendHelper.sendMms(context, new PduComposer(context, pdu).make());
|
|
|
|
|
byte[] response = MmsSendHelper.sendMms(context, new PduComposer(context, pdu).make(), getApnInformation());
|
|
|
|
|
SendConf conf = (SendConf) new PduParser(response).parse();
|
|
|
|
|
|
|
|
|
|
for (int i=0;i<pdu.getBody().getPartsNum();i++) {
|
|
|
|
|