From 3c7e792167c1c480f7a8cae68f1c9c31870382ad Mon Sep 17 00:00:00 2001 From: LoveSy Date: Thu, 27 Jan 2022 21:29:32 +0800 Subject: [PATCH] Catch `PendingIntent.CanceledException` thrown from `send` --- .../java/com/topjohnwu/magisk/core/download/DownloadService.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/core/download/DownloadService.kt b/app/src/main/java/com/topjohnwu/magisk/core/download/DownloadService.kt index 005f40958..52be18b6f 100644 --- a/app/src/main/java/com/topjohnwu/magisk/core/download/DownloadService.kt +++ b/app/src/main/java/com/topjohnwu/magisk/core/download/DownloadService.kt @@ -25,7 +25,6 @@ import kotlinx.coroutines.Job import kotlinx.coroutines.launch import okhttp3.ResponseBody import timber.log.Timber -import java.io.IOException import java.io.InputStream class DownloadService : BaseService() { @@ -77,7 +76,7 @@ class DownloadService : BaseService() { } if (!hasNotifications) stopSelf() - } catch (e: IOException) { + } catch (e: Exception) { Timber.e(e) notifyFail(subject) }