Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix Add ActivityExtensions for Checking Dialog Fragments #13075

Merged

Conversation

alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Jun 6, 2024

  • Tests written, or not not needed

We have encountered an issue with dialog fragments where dismissing and showing them without checking their state leads to crashes for users. This PR addresses and resolves this problem.

Root cause of the problem

Exception java.lang.IllegalStateException: FragmentManager has been destroyed
  at androidx.fragment.app.FragmentManager.enqueueAction (FragmentManager.java:1666)
  at androidx.fragment.app.BackStackRecord.commitInternal (BackStackRecord.java:341)
  at androidx.fragment.app.BackStackRecord.commit (BackStackRecord.java:306)
  at androidx.fragment.app.DialogFragment.show (DialogFragment.java:524)

DialogFragment.java:524 this throws exception if isStateSaved() is true.

@alperozturk96 alperozturk96 changed the title Add ActivityExtensions for Checking Dialog Fragments Bugfix Add ActivityExtensions for Checking Dialog Fragments Jun 6, 2024
Signed-off-by: alperozturk <[email protected]>
@alperozturk96 alperozturk96 enabled auto-merge June 6, 2024 09:06
Copy link

github-actions bot commented Jun 6, 2024

Codacy

Lint

TypemasterPR
Warnings7070
Errors33

SpotBugs

CategoryBaseNew
Bad practice6464
Correctness6969
Dodgy code346346
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness66
Performance5757
Security1919
Total571571

Copy link

github-actions bot commented Jun 6, 2024

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/13075.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@alperozturk96 alperozturk96 merged commit 6423b89 into master Jun 6, 2024
21 checks passed
@AndyScherzinger AndyScherzinger deleted the bugfix/check-dialog-fragments-before-take-an-action branch June 6, 2024 10:41
@AndyScherzinger AndyScherzinger added this to the Nextcloud App 3.30.0 milestone Jun 6, 2024
@alperozturk96
Copy link
Collaborator Author

/backport to stable-3.29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants