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))
|
context.stopService(Intent(context, FcmFetchBackgroundService::class.java))
|
||||||
|
|
||||||
if (startedForeground) {
|
if (startedForeground) {
|
||||||
|
try {
|
||||||
context.startService(FcmFetchForegroundService.buildStopIntent(context))
|
context.startService(FcmFetchForegroundService.buildStopIntent(context))
|
||||||
|
} catch (e: IllegalStateException) {
|
||||||
|
Log.w(TAG, "Failed to stop the foreground notification!", e)
|
||||||
|
}
|
||||||
|
|
||||||
startedForeground = false
|
startedForeground = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue