From 0459f9129976d8628878b09078e404eeaa2127ec Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Fri, 21 Sep 2012 12:33:55 +0200 Subject: Excluded cancelled downloads from the download service report and the download log --- src/de/danoeh/antennapod/asynctask/DownloadStatus.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/de/danoeh/antennapod/asynctask') diff --git a/src/de/danoeh/antennapod/asynctask/DownloadStatus.java b/src/de/danoeh/antennapod/asynctask/DownloadStatus.java index 3ec5344a0..3d63026eb 100644 --- a/src/de/danoeh/antennapod/asynctask/DownloadStatus.java +++ b/src/de/danoeh/antennapod/asynctask/DownloadStatus.java @@ -51,6 +51,7 @@ public class DownloadStatus { protected long size; protected int statusMsg; protected boolean done; + protected boolean cancelled; public DownloadStatus(FeedFile feedfile, String title) { this.feedfile = feedfile; @@ -58,9 +59,9 @@ public class DownloadStatus { } /** Constructor for restoring Download status entries from DB. */ - public DownloadStatus(long id, String title, FeedFile feedfile, int feedfileType, - boolean successful, int reason, Date completionDate, - String reasonDetailed) { + public DownloadStatus(long id, String title, FeedFile feedfile, + int feedfileType, boolean successful, int reason, + Date completionDate, String reasonDetailed) { progressPercent = 100; soFar = 0; size = 0; @@ -79,7 +80,8 @@ public class DownloadStatus { /** Constructor for creating new completed downloads. */ public DownloadStatus(FeedFile feedfile, String title, int reason, boolean successful, String reasonDetailed) { - this(0, title, feedfile, feedfile.getTypeAsInt(), successful, reason, new Date(), reasonDetailed); + this(0, title, feedfile, feedfile.getTypeAsInt(), successful, reason, + new Date(), reasonDetailed); } public FeedFile getFeedFile() { @@ -174,4 +176,12 @@ public class DownloadStatus { return feedfileType; } + public boolean isCancelled() { + return cancelled; + } + + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + } \ No newline at end of file -- cgit v1.2.3