summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/providers/downloads/DownloadService.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/providers/downloads/DownloadService.java b/src/com/android/providers/downloads/DownloadService.java
index 62598b7c..c79ecc44 100644
--- a/src/com/android/providers/downloads/DownloadService.java
+++ b/src/com/android/providers/downloads/DownloadService.java
@@ -196,8 +196,6 @@ public class DownloadService extends Service {
mNotifier = new DownloadNotification(this, mSystemFacade);
mSystemFacade.cancelAllNotifications();
- trimDatabase();
- removeSpuriousFiles();
updateFromProvider();
}
@@ -243,6 +241,9 @@ public class DownloadService extends Service {
public void run() {
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
+ trimDatabase();
+ removeSpuriousFiles();
+
boolean keepService = false;
// for each update from the database, remember which download is
// supposed to get restarted soonest in the future