From 252a0e218e7ad977079340a9fe6e1c5015487848 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Thu, 26 Nov 2015 19:04:04 +0100 Subject: [PATCH] DownloadService: We don't download images ourselves anymore --- .../service/download/DownloadService.java | 41 ------------------- 1 file changed, 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 @@ -613,14 +613,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. */ @@ -1017,39 +1009,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. */