Skip to content

Revive main Looper after suppressing foreground service timing exception#207

Merged
d4rken merged 1 commit intomainfrom
fix/looper-revival-foreground-exception
Apr 14, 2026
Merged

Revive main Looper after suppressing foreground service timing exception#207
d4rken merged 1 commit intomainfrom
fix/looper-revival-foreground-exception

Conversation

@d4rken
Copy link
Copy Markdown
Member

@d4rken d4rken commented Apr 14, 2026

Summary

  • The existing uncaught exception handler suppresses ForegroundServiceDidNotStartInTimeException but doesn't revive the main Looper, leaving the app as a frozen zombie (main thread dead, no UI, no auto-restart)
  • Adds Looper.loop() call after suppression to re-enter the message loop and keep the app functional
  • Adds a one-shot guard so if the same exception fires again after revival, we let it crash normally instead of nesting Looper.loop() calls

Test plan

  • Build assembleFossDebug
  • Verify handler only suppresses ForegroundServiceDidNotStartInTimeException, not other exceptions
  • Verify second occurrence of same exception falls through to default handler

@d4rken d4rken added the bug label Apr 14, 2026
@d4rken d4rken merged commit ed7850c into main Apr 14, 2026
10 checks passed
@d4rken d4rken deleted the fix/looper-revival-foreground-exception branch April 14, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant