From 692006dcd8fb7c3c9c71e8fdfc8352fa99892a8b Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Tue, 2 Aug 2022 14:17:16 -0400 Subject: [PATCH] Be more defensive when starting the FCM foreground service. --- .../java/org/thoughtcrime/securesms/gcm/FcmFetchManager.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/gcm/FcmFetchManager.kt b/app/src/main/java/org/thoughtcrime/securesms/gcm/FcmFetchManager.kt index e9c20742c1..3d58e4fbde 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/gcm/FcmFetchManager.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/gcm/FcmFetchManager.kt @@ -10,7 +10,6 @@ import org.thoughtcrime.securesms.dependencies.ApplicationDependencies import org.thoughtcrime.securesms.jobs.PushNotificationReceiveJob import org.thoughtcrime.securesms.messages.RestStrategy import org.thoughtcrime.securesms.util.concurrent.SerialMonoLifoExecutor -import java.lang.IllegalStateException /** * Our goals with FCM processing are as follows: @@ -64,7 +63,7 @@ object FcmFetchManager { activeCount++ Log.i(TAG, "Incrementing active count to $activeCount") } - } catch (e: IllegalStateException) { + } catch (e: Exception) { Log.w(TAG, "Failed to start service!", e) return false }