Waiting for Wi-Fi notification is not ongoing.
Jeff Sharkey [Thu, 28 Jul 2016 20:03:49 +0000 (14:03 -0600)]
Only active downloads should be classified as ongoing notifications.

Bug: 30065873
Change-Id: I778eafb0737c7da17216fb3012847e6a3beccde9

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

index d580869..d13bb5e 100644 (file)
@@ -213,7 +213,9 @@ public class DownloadNotifier {
                         downloadIds);
                 builder.setContentIntent(PendingIntent.getBroadcast(mContext,
                         0, intent, PendingIntent.FLAG_UPDATE_CURRENT));
-                builder.setOngoing(true);
+                if (type == TYPE_ACTIVE) {
+                    builder.setOngoing(true);
+                }
 
                 // Add a Cancel action
                 final Uri cancelUri = new Uri.Builder().scheme("cancel-dl").appendPath(tag).build();