kopia lustrzana https://github.com/ryukoposting/Signal-Android
Catch a foreground service start exception.
rodzic
50ded5c92a
commit
04b0c01015
|
@ -83,7 +83,12 @@ object FcmFetchManager {
|
|||
context.stopService(Intent(context, FcmFetchBackgroundService::class.java))
|
||||
|
||||
if (startedForeground) {
|
||||
context.startService(FcmFetchForegroundService.buildStopIntent(context))
|
||||
try {
|
||||
context.startService(FcmFetchForegroundService.buildStopIntent(context))
|
||||
} catch (e: IllegalStateException) {
|
||||
Log.w(TAG, "Failed to stop the foreground notification!", e)
|
||||
}
|
||||
|
||||
startedForeground = false
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue