summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-09-28 13:20:33 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-28 13:20:33 -0700
commitd01ccf8ef98aba424a49c44ed6db39435c6d6d77 (patch)
tree4cacfca68bc62733e2ae7ca28a02604c0d5ece83
parent14961f94d762e733a733e3268fca1074d8da5f8c (diff)
parentad017bfbbb549cbbaa522038fa46450f0cedf413 (diff)
downloadandroid_packages_providers_DownloadProvider-d01ccf8ef98aba424a49c44ed6db39435c6d6d77.zip
android_packages_providers_DownloadProvider-d01ccf8ef98aba424a49c44ed6db39435c6d6d77.tar.gz
android_packages_providers_DownloadProvider-d01ccf8ef98aba424a49c44ed6db39435c6d6d77.tar.bz2
Merge "Trim the database & check spurious files off the UI thread." into gingerbread
-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 62598b7..c79ecc4 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