|
|
|
@ -133,10 +133,7 @@ public class DownloadTask extends AbsTask<DownloadTaskEntity, DownloadEntity> { |
|
|
|
|
*/ |
|
|
|
|
@Override public void cancel() { |
|
|
|
|
if (!mEntity.isDownloadComplete()) { |
|
|
|
|
mUtil.cancelDownload(); |
|
|
|
|
mUtil.delConfigFile(); |
|
|
|
|
mUtil.delTempFile(); |
|
|
|
|
mEntity.deleteData(); |
|
|
|
|
if (!mUtil.isDownloading()) { |
|
|
|
|
if (mOutHandler != null) { |
|
|
|
|
mOutHandler.obtainMessage(DownloadSchedulers.CANCEL, this).sendToTarget(); |
|
|
|
|
} |
|
|
|
@ -145,6 +142,11 @@ public class DownloadTask extends AbsTask<DownloadTaskEntity, DownloadEntity> { |
|
|
|
|
intent.putExtra(Aria.DOWNLOAD_ENTITY, mEntity); |
|
|
|
|
mContext.sendBroadcast(intent); |
|
|
|
|
} |
|
|
|
|
mUtil.cancelDownload(); |
|
|
|
|
mUtil.delConfigFile(); |
|
|
|
|
mUtil.delTempFile(); |
|
|
|
|
mEntity.deleteData(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static class Builder { |
|
|
|
|