summaryrefslogtreecommitdiff
path: root/src/de/podfetcher
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2012-06-16 13:31:28 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2012-06-16 13:31:28 +0200
commitc2054be4600cd88155d12be01e166ba38ff0d32c (patch)
tree38ff634f7e0058342b15bbad72f6b143dd6a94de /src/de/podfetcher
parent26c8772e0a60aa916dceff4ec4d4eb7af2a19460 (diff)
downloadAntennaPod-c2054be4600cd88155d12be01e166ba38ff0d32c.zip
Removed unnecessary communication with DownloadService
Diffstat (limited to 'src/de/podfetcher')
-rw-r--r--src/de/podfetcher/service/DownloadService.java8
-rw-r--r--src/de/podfetcher/storage/DownloadRequester.java5
2 files changed, 10 insertions, 3 deletions
diff --git a/src/de/podfetcher/service/DownloadService.java b/src/de/podfetcher/service/DownloadService.java
index cafdeecab..36b894242 100644
--- a/src/de/podfetcher/service/DownloadService.java
+++ b/src/de/podfetcher/service/DownloadService.java
@@ -63,6 +63,14 @@ public class DownloadService extends Service {
}
}
+
+
+ @Override
+ public int onStartCommand(Intent intent, int flags, int startId) {
+ queryDownloads();
+ return super.onStartCommand(intent, flags, startId);
+ }
+
@Override
public void onCreate() {
Log.d(TAG, "Service started");
diff --git a/src/de/podfetcher/storage/DownloadRequester.java b/src/de/podfetcher/storage/DownloadRequester.java
index 52bb663e8..a92b3a0e7 100644
--- a/src/de/podfetcher/storage/DownloadRequester.java
+++ b/src/de/podfetcher/storage/DownloadRequester.java
@@ -76,12 +76,11 @@ public class DownloadRequester {
// TODO Set Allowed Network Types
DownloadManager manager = (DownloadManager) context
.getSystemService(Context.DOWNLOAD_SERVICE);
- context.startService(new Intent(context, DownloadService.class));
+
long downloadId = manager.enqueue(request);
item.setDownloadId(downloadId);
item.setFile_url(dest.toString());
-
- notifyDownloadService(context);
+ context.startService(new Intent(context, DownloadService.class));
return downloadId;
}