Don't show error when download was cancelled (#6476)
This commit is contained in:
parent
6d7bfef8a5
commit
eaae6585d6
|
@ -146,7 +146,7 @@ public class FeedUpdateWorker extends Worker {
|
||||||
downloader.call();
|
downloader.call();
|
||||||
|
|
||||||
if (!downloader.getResult().isSuccessful()) {
|
if (!downloader.getResult().isSuccessful()) {
|
||||||
if (downloader.cancelled) {
|
if (downloader.cancelled || downloader.getResult().getReason() == DownloadError.ERROR_DOWNLOAD_CANCELLED) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DBWriter.setFeedLastUpdateFailed(request.getFeedfileId(), true);
|
DBWriter.setFeedLastUpdateFailed(request.getFeedfileId(), true);
|
||||||
|
|
|
@ -317,6 +317,7 @@ public class HttpDownloader extends Downloader {
|
||||||
private void onCancelled() {
|
private void onCancelled() {
|
||||||
Log.d(TAG, "Download was cancelled");
|
Log.d(TAG, "Download was cancelled");
|
||||||
result.setCancelled();
|
result.setCancelled();
|
||||||
|
cancelled = true;
|
||||||
cleanup();
|
cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue