Merge branch 'fix-661--prevent-notification-swiping' into 'master'
Don't allow download notifications to be cancelled, other than our "Cancel" action on them. *NOTE: To be cherry-picked into stable-v0.100* As a user, I expect removing a notification of a pending action to cancel that pending action. This change makes the pending notifications uncancellable, unless users use our cancel action added to the events by @paresh. If the user is on an older device that doesn't support these type of rich notifications, then they will need to touch the pending download notification, which will take them to the `AppDetails` activity for that app. From there, they can cancel the install, which will remove the app from the pending download queue. 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. See merge request !292
This commit is contained in:
commit
611db650d5
@ -250,7 +250,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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user