From c4941a3c50dd71c3ddfaad941c5c0efe30244174 Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Sat, 18 Aug 2012 16:18:33 +0200 Subject: [PATCH] DownloadService was not always counting queued downloads --- .../service/download/DownloadService.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/de/danoeh/antennapod/service/download/DownloadService.java b/src/de/danoeh/antennapod/service/download/DownloadService.java index c52266728..3aedce3d1 100644 --- a/src/de/danoeh/antennapod/service/download/DownloadService.java +++ b/src/de/danoeh/antennapod/service/download/DownloadService.java @@ -170,15 +170,16 @@ public class DownloadService extends Service { return t; } }); - downloadExecutor = Executors.newFixedThreadPool(NUM_PARALLEL_DOWNLOADS, new ThreadFactory() { + downloadExecutor = Executors.newFixedThreadPool(NUM_PARALLEL_DOWNLOADS, + new ThreadFactory() { - @Override - public Thread newThread(Runnable r) { - Thread t = new Thread(r); - t.setPriority(Thread.MIN_PRIORITY); - return t; - } - }); + @Override + public Thread newThread(Runnable r) { + Thread t = new Thread(r); + t.setPriority(Thread.MIN_PRIORITY); + return t; + } + }); manager = FeedManager.getInstance(); requester = DownloadRequester.getInstance(); mediaplayer = new MediaPlayer(); @@ -297,9 +298,8 @@ public class DownloadService extends Service { } else { Log.e(TAG, "Could not find feedfile in download requester when trying to enqueue new download"); - queryDownloads(); - } + queryDownloads(); } private BroadcastReceiver downloadQueued = new BroadcastReceiver() {