diff options
author | Jeff Sharkey <jsharkey@android.com> | 2012-12-13 14:23:09 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-12-13 14:23:09 -0800 |
commit | 226c76b54ed0c1ad1b8a858abbe94551e47476c3 (patch) | |
tree | 32aaf31d110efec3286047336da84c9f31612f88 | |
parent | 1244a63f799ab689a2d7d94415133be26580ae70 (diff) | |
parent | 195b46b8a59eb522fc91ac6f498f359a337d3f3e (diff) | |
download | android_packages_providers_DownloadProvider-226c76b54ed0c1ad1b8a858abbe94551e47476c3.tar.gz android_packages_providers_DownloadProvider-226c76b54ed0c1ad1b8a858abbe94551e47476c3.tar.bz2 android_packages_providers_DownloadProvider-226c76b54ed0c1ad1b8a858abbe94551e47476c3.zip |
am 195b46b8: am b0bb182a: Cancel stale notifications when starting.
* commit '195b46b8a59eb522fc91ac6f498f359a337d3f3e':
Cancel stale notifications when starting.
-rw-r--r-- | src/com/android/providers/downloads/DownloadNotifier.java | 4 | ||||
-rw-r--r-- | src/com/android/providers/downloads/DownloadService.java | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/providers/downloads/DownloadNotifier.java b/src/com/android/providers/downloads/DownloadNotifier.java index f89d2d02..daae7831 100644 --- a/src/com/android/providers/downloads/DownloadNotifier.java +++ b/src/com/android/providers/downloads/DownloadNotifier.java @@ -72,6 +72,10 @@ public class DownloadNotifier { Context.NOTIFICATION_SERVICE); } + public void cancelAll() { + mNotifManager.cancelAll(); + } + /** * Update {@link NotificationManager} to reflect the given set of * {@link DownloadInfo}, adding, collapsing, and removing as needed. diff --git a/src/com/android/providers/downloads/DownloadService.java b/src/com/android/providers/downloads/DownloadService.java index 5b767a27..b97346b2 100644 --- a/src/com/android/providers/downloads/DownloadService.java +++ b/src/com/android/providers/downloads/DownloadService.java @@ -223,6 +223,7 @@ public class DownloadService extends Service { mMediaScannerConnection = new MediaScannerConnection(); mNotifier = new DownloadNotifier(this); + mNotifier.cancelAll(); mStorageManager = StorageManager.getInstance(getApplicationContext()); updateFromProvider(); |