fix persistent stale attachment jobs

Closes #4041
// FREEBIE
pull/1/head
Jake McGinty 10 years ago committed by Moxie Marlinspike
parent adc6fc8524
commit 21b7dccf1c

@ -67,6 +67,11 @@ public class AttachmentDownloadJob extends MasterSecretJob implements Injectable
final PartId partId = new PartId(partRowId, partUniqueId);
final PduPart part = DatabaseFactory.getPartDatabase(context).getPart(partId);
if (part == null) {
Log.w(TAG, "part no longer exists.");
return;
}
Log.w(TAG, "Downloading push part " + partId);
retrievePart(masterSecret, part, messageId);

@ -78,8 +78,8 @@ public class MediaNetworkRequirement implements Requirement, ContextDependent {
final PartDatabase db = DatabaseFactory.getPartDatabase(context);
final PduPart part = db.getPart(partId);
if (part == null) {
Log.w(TAG, "part was null");
return false;
Log.w(TAG, "part was null, returning vacuous true");
return true;
}
Log.w(TAG, "part transfer progress is " + part.getTransferProgress());

Loading…
Cancel
Save