Files
capod/app
darken e7cb53f0b8 fix: Harden the error dialog's Google Play fix action
The dialog's fix dispatch ran unguarded: a throwing action crashed the UI
thread from inside a click handler and skipped onDismiss(), leaving the
dialog latched on the current error. The dispatch is now wrapped in
try/catch with onDismiss() in a finally block.

Google Play fix action:
- Drop FLAG_ACTIVITY_NEW_TASK. The action runs on an activity context, so
  the flag only detached Play's app info from the caller's task and back
  stack.
- Catch SecurityException next to ActivityNotFoundException: Play can be
  installed but blocked (disabled app, restricted profile, guarding ROM),
  which denies the launch instead of failing to resolve it.
- The fallback toast is now a translatable string resource instead of a
  hardcoded literal.

New coverage: ComposeErrorDialogGuardTest pins that a throwing fix action
still dismisses the dialog (shared source set, so both flavors run it),
GplayFixActionTest pins the denied and unresolvable launches showing a
toast instead of crashing, and ComposeErrorDialogTest now asserts the
launch intent carries no NEW_TASK flag.
2026-08-04 22:01:26 +02:00
..
2022-09-14 18:00:18 +02:00
2022-09-14 18:00:18 +02:00