|
|
@ -40,11 +40,14 @@ public class SmsTransport {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void deliverSecureMessage(SmsMessageRecord message) throws UndeliverableMessageException {
|
|
|
|
private void deliverSecureMessage(SmsMessageRecord message) throws UndeliverableMessageException {
|
|
|
|
|
|
|
|
MultipartSmsMessageHandler multipartMessageHandler = new MultipartSmsMessageHandler();
|
|
|
|
|
|
|
|
OutgoingTextMessage transportMessage = OutgoingTextMessage.from(message);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (message.isSecure()) {
|
|
|
|
String encryptedMessage = getAsymmetricEncrypt(masterSecret, message.getBody().getBody(),
|
|
|
|
String encryptedMessage = getAsymmetricEncrypt(masterSecret, message.getBody().getBody(),
|
|
|
|
message.getIndividualRecipient());
|
|
|
|
message.getIndividualRecipient());
|
|
|
|
|
|
|
|
transportMessage = transportMessage.withBody(encryptedMessage);
|
|
|
|
OutgoingTextMessage transportMessage = OutgoingTextMessage.from(message).withBody(encryptedMessage);
|
|
|
|
}
|
|
|
|
MultipartSmsMessageHandler multipartMessageHandler = new MultipartSmsMessageHandler();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ArrayList<String> messages = multipartMessageHandler.divideMessage(transportMessage);
|
|
|
|
ArrayList<String> messages = multipartMessageHandler.divideMessage(transportMessage);
|
|
|
|
ArrayList<PendingIntent> sentIntents = constructSentIntents(message.getId(), message.getType(), messages);
|
|
|
|
ArrayList<PendingIntent> sentIntents = constructSentIntents(message.getId(), message.getType(), messages);
|
|
|
|