Skip to content

Fix crash when tapping local backend radio button in setup#138

Open
rplankenhorn wants to merge 1 commit into
Kegbot:masterfrom
rplankenhorn:fix/setup-fragment-crash
Open

Fix crash when tapping local backend radio button in setup#138
rplankenhorn wants to merge 1 commit into
Kegbot:masterfrom
rplankenhorn:fix/setup-fragment-crash

Conversation

@rplankenhorn
Copy link
Copy Markdown
Contributor

Summary

  • Fixes a crash reported by @patfreeman when tapping the local backend radio button during setup
  • DialogFragment subclasses must be public static so Android can recreate them from saved instance state; the anonymous inner class violated this requirement
  • Extracted the anonymous class to a named public static inner class LocalBackendWarningDialog

Test plan

  • Open setup flow and tap the "Local" backend radio button — confirm the warning dialog appears without crashing
  • Rotate the screen while the dialog is showing — confirm no crash on recreation

🤖 Generated with Claude Code

Anonymous DialogFragment inner classes must be public static to allow
Android to recreate them from saved instance state. Extracted the
anonymous class to a named public static inner class
LocalBackendWarningDialog.

Fixes: java.lang.IllegalStateException: Fragment null must be a public
static class to be properly recreated from instance state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rplankenhorn rplankenhorn mentioned this pull request Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant