Commit b9646eb5 authored by MozLando's avatar MozLando
Browse files

Merge #5159

5159: AbstractFetchDownloadService: Remove notifications when task gets removed. r=csadilek a=pocmo


Co-authored-by: default avatarSebastian Kaspari <>
parents 86505d96 ed5811af
......@@ -185,8 +185,22 @@ abstract class AbstractFetchDownloadService : Service() {
return super.onStartCommand(intent, flags, startId)
override fun onTaskRemoved(rootIntent: Intent?) {
// If the task gets removed (app gets swiped away in the task switcher) our process and this
// servies gets killed. In this situation we remove the notification since the download will
// stop and cannot be controlled via the notification anymore (until we persist enough data
// to resume downloads from a new process).
val notificationManager = NotificationManagerCompat.from(this)
downloadJobs.values.forEach { state ->
override fun onDestroy() {
downloadJobs.values.forEach {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment