Commit 9d2351cc authored by Bastien Le Querrec's avatar Bastien Le Querrec

use proper session when downloading MMS messages

parent 3ec87c19
Pipeline #161 passed with stages
in 46 minutes and 1 second
......@@ -36,6 +36,7 @@ import org.smssecure.smssecure.notifications.MessageNotifier;
import org.smssecure.smssecure.protocol.WirePrefix;
import org.smssecure.smssecure.providers.SingleUseBlobProvider;
import org.smssecure.smssecure.service.KeyCachingService;
import org.smssecure.smssecure.util.dualsim.DualSimUtil;
import org.smssecure.smssecure.util.Util;
import org.whispersystems.jobqueue.JobParameters;
import org.whispersystems.jobqueue.requirements.NetworkRequirement;
......@@ -120,7 +121,9 @@ public class MmsDownloadJob extends MasterSecretJob {
throw new MmsException("Invalid content location: "+contentLocation);
}
RetrieveConf retrieveConf = new CompatMmsConnection(context).retrieve(contentLocation, transactionId, notification.get().getSubscriptionId());
int deviceSubbscriptionId = DualSimUtil.getSubscriptionIdFromDeviceSubscriptionId(context, notification.get().getSubscriptionId());
RetrieveConf retrieveConf = new CompatMmsConnection(context).retrieve(contentLocation, transactionId, deviceSubbscriptionId);
if (retrieveConf == null) {
throw new MmsException("RetrieveConf was null");
......
......@@ -17,6 +17,7 @@ import org.smssecure.smssecure.notifications.MessageNotifier;
import org.smssecure.smssecure.recipients.RecipientFactory;
import org.smssecure.smssecure.recipients.Recipients;
import org.smssecure.smssecure.service.KeyCachingService;
import org.smssecure.smssecure.util.dualsim.DualSimUtil;
import org.smssecure.smssecure.util.SilencePreferences;
import org.smssecure.smssecure.util.Util;
import org.whispersystems.jobqueue.JobParameters;
......@@ -35,8 +36,11 @@ public class MmsReceiveJob extends ContextJob {
.withWakeLock(true)
.withPersistence().create());
Log.w(TAG, "subscriptionId: " + subscriptionId);
Log.w(TAG, "Found app subscription ID: " + DualSimUtil.getSubscriptionIdFromDeviceSubscriptionId(context, subscriptionId));
this.data = data;
this.subscriptionId = subscriptionId;
this.subscriptionId = DualSimUtil.getSubscriptionIdFromDeviceSubscriptionId(context, subscriptionId);
}
@Override
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment