fix persistent stale attachment jobs

Closes #4041
// FREEBIE
fork-5.53.8
Jake McGinty 2015-09-07 11:32:11 -10:00 zatwierdzone przez Moxie Marlinspike
rodzic adc6fc8524
commit 21b7dccf1c
2 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -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);

Wyświetl plik

@ -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());