diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2015-11-26 19:04:04 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2015-11-26 19:46:14 +0100 |
commit | 252a0e218e7ad977079340a9fe6e1c5015487848 (patch) | |
tree | 5c768777089fd1ac12c0a2db4f071e57e55b376b /core | |
parent | 5c49dabf94ca863c4b53e88b969fa37d3f67c97e (diff) | |
download | AntennaPod-252a0e218e7ad977079340a9fe6e1c5015487848.zip |
DownloadService: We don't download images ourselves anymore
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java index 505061ec4..677765e92 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java @@ -614,14 +614,6 @@ public class DownloadService extends Service { } /** - * Is called whenever a Feed-Image is downloaded - */ - private void handleCompletedImageDownload(DownloadStatus status, DownloadRequest request) { - Log.d(TAG, "Handling completed Image Download"); - syncExecutor.execute(new ImageHandlerThread(status, request)); - } - - /** * Is called whenever a FeedMedia is downloaded. */ private void handleCompletedFeedMediaDownload(DownloadStatus status, DownloadRequest request) { @@ -1018,39 +1010,6 @@ public class DownloadService extends Service { } /** - * Handles a completed image download. - */ - class ImageHandlerThread implements Runnable { - - private DownloadRequest request; - private DownloadStatus status; - - public ImageHandlerThread(DownloadStatus status, DownloadRequest request) { - Validate.notNull(status); - Validate.notNull(request); - - this.status = status; - this.request = request; - } - - @Override - public void run() { - FeedImage image = DBReader.getFeedImage(request.getFeedfileId()); - if (image == null) { - throw new IllegalStateException("Could not find downloaded image in database"); - } - - image.setFile_url(request.getDestination()); - image.setDownloaded(true); - - saveDownloadStatus(status); - DBWriter.setFeedImage(image); - numberOfDownloads.decrementAndGet(); - queryDownloadsAsync(); - } - } - - /** * Handles a completed media download. */ class MediaHandlerThread implements Runnable { |