mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-22 12:08:34 +00:00
Swallow potential foreground service crash.
This commit is contained in:
@@ -123,7 +123,11 @@ class FcmFetchForegroundService : Service() {
|
||||
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
Log.d(TAG, "onStartCommand()")
|
||||
try {
|
||||
postForegroundNotification()
|
||||
} catch (e: RuntimeException) {
|
||||
Log.w(TAG, "Failed to start foreground service! StopSelf: ${intent?.getBooleanExtra(KEY_STOP_SELF, false)}", e)
|
||||
}
|
||||
|
||||
return if (intent != null && intent.getBooleanExtra(KEY_STOP_SELF, false)) {
|
||||
WakeLockUtil.release(wakeLock, WAKELOCK_TAG)
|
||||
|
||||
Reference in New Issue
Block a user