Active notifications only for running downloads.
Jeff Sharkey [Fri, 8 Feb 2013 00:13:20 +0000 (16:13 -0800)]
Bug: 8145142
Change-Id: I9119796f809aa967f7ec6bb2a3d2b815e86eaf1b

src/com/android/providers/downloads/DownloadNotifier.java

index 2dd9805..0af9cb8 100644 (file)
@@ -19,6 +19,7 @@ package com.android.providers.downloads;
 import static android.app.DownloadManager.Request.VISIBILITY_VISIBLE;
 import static android.app.DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED;
 import static android.app.DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION;
+import static android.provider.Downloads.Impl.STATUS_RUNNING;
 
 import android.app.DownloadManager;
 import android.app.Notification;
@@ -327,7 +328,7 @@ public class DownloadNotifier {
     }
 
     private static boolean isActiveAndVisible(DownloadInfo download) {
-        return Downloads.Impl.isStatusInformational(download.mStatus) &&
+        return download.mStatus == STATUS_RUNNING &&
                 (download.mVisibility == VISIBILITY_VISIBLE
                 || download.mVisibility == VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
     }