Skip to content

fix(android): Do not try to rehydrate destroyed dialogs - #10414

Merged
NathanWalker merged 2 commits into
NativeScript:mainfrom
jcassidyav:dialog-fix
Oct 24, 2023
Merged

NathanWalker merged 2 commits into
NativeScript:mainfrom
jcassidyav:dialog-fix

Conversation

@jcassidyav

Copy link
Copy Markdown
Contributor

PR Checklist

What is the current behavior?

If a Dialog is currently being shown, and the app is sent to the background where the Activity is then destroyed, when the app is brought to the foreground the app will crash.

This is because when the activity is destroyed, the dialog is torn down, but this happens after state is saved and it crashes when the dialog is being restored.

( Easy to test by turning on the Don't keep activities developer option. )

What is the new behavior?

The change is to cancel the dialog creation if being restored in a state where the creation of the dialog will crash.

@cla-bot cla-bot Bot added the cla: yes label Oct 18, 2023
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