Skip to content

fix Modal crash when calling syncSystemBarsVisibility()#49386

Closed
alanleedev wants to merge 1 commit into
facebook:mainfrom
alanleedev:export-D69578581
Closed

fix Modal crash when calling syncSystemBarsVisibility()#49386
alanleedev wants to merge 1 commit into
facebook:mainfrom
alanleedev:export-D69578581

Conversation

@alanleedev
Copy link
Copy Markdown
Contributor

Summary:
It appears that currentActivity.decorView sometime is not attached to a window during the process of creating a Dialog for currently unknown reasons causing a crash.
Add check to skip call to syncSystemBarsVisibility() in such case as current code cannot function without valid RootWindowInsets.

Changelog:
[Android][Fixed] - fixed crash with Modal when trying to call syncSystemBarsVisibility()

Differential Revision: D69578581

Summary:
It appears that `currentActivity.decorView` sometime is not attached to a window during the process of creating a Dialog for currently unknown reasons causing a crash.
Add check to skip call to `syncSystemBarsVisibility()` in such case as current code cannot function without valid RootWindowInsets.

Changelog:
[Android][Fixed] - fixed crash with Modal when trying to call syncSystemBarsVisibility()

Differential Revision: D69578581
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Feb 13, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D69578581

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 141fb23.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @alanleedev in 141fb23

When will my fix make it into a release? | How to file a pick request?

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants