summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/asynctask
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2013-07-07 00:45:42 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2013-07-07 00:45:42 +0200
commit250b88457ba2e25edd82495a1ca1b0215047c63d (patch)
tree056877e50c6d90a6d996432bf336c1e1d46058c4 /src/de/danoeh/antennapod/asynctask
parentab9d499ca043b135a6cb44940ad2b20aa84d391b (diff)
downloadAntennaPod-250b88457ba2e25edd82495a1ca1b0215047c63d.zip
Set 'reason' attribute when download was successful.
Diffstat (limited to 'src/de/danoeh/antennapod/asynctask')
-rw-r--r--src/de/danoeh/antennapod/asynctask/DownloadStatus.java29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/de/danoeh/antennapod/asynctask/DownloadStatus.java b/src/de/danoeh/antennapod/asynctask/DownloadStatus.java
index 86bcb6814..7d141f356 100644
--- a/src/de/danoeh/antennapod/asynctask/DownloadStatus.java
+++ b/src/de/danoeh/antennapod/asynctask/DownloadStatus.java
@@ -152,17 +152,24 @@ public class DownloadStatus {
this.statusMsg = statusMsg;
}
- public void setReason(DownloadError reason) {
- this.reason = reason;
- }
-
- public void setSuccessful(boolean successful) {
- this.successful = successful;
- }
-
- public void setDone(boolean done) {
- this.done = done;
- }
+ public void setSuccessful() {
+ this.successful = true;
+ this.reason = DownloadError.SUCCESS;
+ this.done = true;
+ }
+
+ public void setFailed(DownloadError reason, String reasonDetailed) {
+ this.successful = false;
+ this.reason = reason;
+ this.reasonDetailed = reasonDetailed;
+ }
+
+ public void setCancelled() {
+ this.successful = false;
+ this.reason = DownloadError.ERROR_DOWNLOAD_CANCELLED;
+ this.done = true;
+ this.cancelled = true;
+ }
public void setCompletionDate(Date completionDate) {
this.completionDate = completionDate;