Catch error properly when app update check fails (fixes #8019)

This commit is contained in:
arkon
2022-09-18 16:24:26 -04:00
parent 83871fc013
commit 7ec822503a
3 changed files with 12 additions and 12 deletions
@@ -133,10 +133,10 @@ class AppUpdateService : Service() {
throw Exception("Unsuccessful response")
}
notifier.promptInstall(apkFile.getUriCompat(this))
} catch (error: Exception) {
logcat(LogPriority.ERROR, error)
if (error is CancellationException ||
(error is StreamResetException && error.errorCode == ErrorCode.CANCEL)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
if (e is CancellationException ||
(e is StreamResetException && e.errorCode == ErrorCode.CANCEL)
) {
notifier.cancel()
} else {