summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-09-28 13:23:45 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-28 13:23:45 -0700
commitfce7a5e8547d4ea53700f37b87752e26a39e4cc4 (patch)
treedd37a3265806aa0fce50ffa3ecb25fc0a95f3b0e /src
parentee215b3df5482b9051364d99411f70132734be21 (diff)
parentd01ccf8ef98aba424a49c44ed6db39435c6d6d77 (diff)
downloadandroid_packages_providers_DownloadProvider-fce7a5e8547d4ea53700f37b87752e26a39e4cc4.tar.gz
android_packages_providers_DownloadProvider-fce7a5e8547d4ea53700f37b87752e26a39e4cc4.tar.bz2
android_packages_providers_DownloadProvider-fce7a5e8547d4ea53700f37b87752e26a39e4cc4.zip
am d01ccf8e: Merge "Trim the database & check spurious files off the UI thread." into gingerbread
Merge commit 'd01ccf8ef98aba424a49c44ed6db39435c6d6d77' into gingerbread-plus-aosp * commit 'd01ccf8ef98aba424a49c44ed6db39435c6d6d77': Trim the database & check spurious files off the UI thread.
Diffstat (limited to 'src')
-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