use of ws.com.google.android.mms.pdu.PduComposer in project Signal-Android by WhisperSystems.
the class IncomingLegacyMmsConnection method sendRetrievedAcknowledgement.
private void sendRetrievedAcknowledgement(byte[] transactionId, boolean usingRadio, boolean useProxy) throws ApnUnavailableException {
try {
NotifyRespInd notifyResponse = new NotifyRespInd(PduHeaders.CURRENT_MMS_VERSION, transactionId, PduHeaders.STATUS_RETRIEVED);
OutgoingLegacyMmsConnection connection = new OutgoingLegacyMmsConnection(context);
connection.sendNotificationReceived(new PduComposer(context, notifyResponse).make(), usingRadio, useProxy);
} catch (InvalidHeaderValueException | IOException e) {
Log.w(TAG, e);
}
}
use of ws.com.google.android.mms.pdu.PduComposer in project Signal-Android by WhisperSystems.
the class MmsSendJob method getPduBytes.
private byte[] getPduBytes(SendReq message) throws IOException, UndeliverableMessageException, InsecureFallbackApprovalException {
String number = TelephonyUtil.getManager(context).getLine1Number();
message.setBody(SmilUtil.getSmilBody(message.getBody()));
if (!TextUtils.isEmpty(number)) {
message.setFrom(new EncodedStringValue(number));
}
byte[] pduBytes = new PduComposer(context, message).make();
if (pduBytes == null) {
throw new UndeliverableMessageException("PDU composition failed, null payload");
}
return pduBytes;
}
Aggregations