Skip to content

Fix crash when rotating modify bookmark dialog#4644

Open
geoffreysisco wants to merge 1 commit into
TeamAmaze:release/4.0from
geoffreysisco:fix/rename-bookmark-rotation-crash
Open

Fix crash when rotating modify bookmark dialog#4644
geoffreysisco wants to merge 1 commit into
TeamAmaze:release/4.0from
geoffreysisco:fix/rename-bookmark-rotation-crash

Conversation

@geoffreysisco

Copy link
Copy Markdown
Contributor

Description

Migrate RenameBookmark to AndroidX DialogFragment and update the launch path to use getSupportFragmentManager().

This fixes a crash that could occur when the device is rotated while the Modify Bookmark dialog is open. After the migration, the dialog restores successfully after rotation and bookmark functionality continues to work as expected.

Issue tracker

Fixes #4433

Automatic tests

  • Added unit tests for specific individual functions
  • Added headless tests for new app functionality
  • Added emulator tests for new UI elements

Manual tests

  • Done
  • Device: Pixel 9 Pro emulator
  • OS: Android 16

Verified manually:

  • Modify Bookmark dialog restores after rotation without crashing
  • Activity recreation completes successfully
  • Rename works
  • Delete works
  • Cancel works
  • Drawer refreshes correctly
  • Bookmark changes persist after dialog restoration

Attached video demonstrates:

  • Modify Bookmark dialog open during rotation
  • Dialog restoration after activity recreation
  • Successful bookmark rename after rotation
  • No crash during the reproduction scenario
after.mp4

Build tasks success

Successfully running following tasks on local:

  • ./gradlew assembledebug
  • ./gradlew spotlessCheck

Generative code

  • This PR used generative code tools (GenAI, LLMs, etc.)
  • Model: GPT-5.5
  • Version: ChatGPT
  • Provider: OpenAI

Migrate RenameBookmark from the platform DialogFragment
implementation to AndroidX DialogFragment and update the
launch path to use getSupportFragmentManager().

After the migration, the dialog restores successfully after
rotation and bookmark functionality continues to work as
expected.
@geoffreysisco geoffreysisco changed the title Fix crash when rotating rename bookmark dialog Fix crash when rotating modify bookmark dialog Jun 10, 2026
@VishnuSanal VishnuSanal added the PR-Awaiting-Initial-Review this PR is awaiting for an initial review label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Awaiting-Initial-Review this PR is awaiting for an initial review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on DialogFragment Restore Due to Null Dialog

2 participants