Skip to content

Commit

Permalink
[android] Fix crash when PushNotificationService cannot be started
Browse files Browse the repository at this point in the history
  • Loading branch information
charlag committed Sep 2, 2024
1 parent 8746b77 commit c1ee285
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,8 @@ class MainActivity : FragmentActivity() {
attemptForeground = true,
)
startService(serviceIntent)
} catch (e: IllegalStateException) {
// We can run into this if the app is in the background for some reason
Log.w(TAG, e)
} catch (e: Exception) {
Log.w(TAG, "Could not start push notification service", e)
}
val jobScheduler = getSystemService(JOB_SCHEDULER_SERVICE) as JobScheduler
jobScheduler.schedule(
Expand Down

0 comments on commit c1ee285

Please sign in to comment.