mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-24 06:02:22 +00:00
enforce NonNull on incoming MMS content location
Fixes #2959 Closes #2975 // FREEBIE
This commit is contained in:
committed by
Moxie Marlinspike
parent
4a9028aedd
commit
a28408b29f
@@ -77,14 +77,18 @@ public class MmsDownloadJob extends MasterSecretJob {
|
||||
return;
|
||||
}
|
||||
|
||||
database.markDownloadState(messageId, MmsDatabase.Status.DOWNLOAD_CONNECTING);
|
||||
|
||||
String contentLocation = new String(notification.get().getContentLocation());
|
||||
byte[] transactionId = notification.get().getTransactionId();
|
||||
|
||||
Log.w(TAG, "Downloading mms at " + Uri.parse(contentLocation).getHost());
|
||||
|
||||
try {
|
||||
if (notification.get().getContentLocation() == null) {
|
||||
throw new MmsException("Notification content location was null.");
|
||||
}
|
||||
|
||||
database.markDownloadState(messageId, MmsDatabase.Status.DOWNLOAD_CONNECTING);
|
||||
|
||||
String contentLocation = new String(notification.get().getContentLocation());
|
||||
byte[] transactionId = notification.get().getTransactionId();
|
||||
|
||||
Log.w(TAG, "Downloading mms at " + Uri.parse(contentLocation).getHost());
|
||||
|
||||
RetrieveConf retrieveConf = getMmsConnection(context).retrieve(contentLocation, transactionId);
|
||||
if (retrieveConf == null) {
|
||||
throw new MmsException("RetrieveConf was null");
|
||||
|
||||
Reference in New Issue
Block a user