From f184c9735452176f109a6f9e0f014746ee45e011 Mon Sep 17 00:00:00 2001
From: Peter Serwylo <peter@serwylo.com>
Date: Sun, 15 May 2016 11:53:04 +1000
Subject: [PATCH] Don't allow download notifications to be cancelled, other
 than our "Cancel" action on them.

Until the notifications are reworked, this is the simplest solution.
In the near future, the notifications will likely be combined into one
more intelligent notification with better defined semantics.
---
 .../org/fdroid/fdroid/installer/InstallManagerService.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/src/main/java/org/fdroid/fdroid/installer/InstallManagerService.java b/app/src/main/java/org/fdroid/fdroid/installer/InstallManagerService.java
index 6aa83b599..3491dce43 100644
--- a/app/src/main/java/org/fdroid/fdroid/installer/InstallManagerService.java
+++ b/app/src/main/java/org/fdroid/fdroid/installer/InstallManagerService.java
@@ -243,7 +243,8 @@ public class InstallManagerService extends Service {
     private NotificationCompat.Builder createNotification(String urlString, Apk apk) {
         int downloadUrlId = urlString.hashCode();
         return new NotificationCompat.Builder(this)
-                .setAutoCancel(true)
+                .setAutoCancel(false)
+                .setOngoing(true)
                 .setContentIntent(getAppDetailsIntent(downloadUrlId, apk))
                 .setContentTitle(getString(R.string.downloading_apk, getAppName(urlString, apk)))
                 .addAction(R.drawable.ic_cancel_black_24dp, getString(R.string.cancel),