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

Fix crash when current activity is null #6022

Merged

Conversation

maciekstosio
Copy link
Contributor

Summary

Should fix: #5892. We do not check if the current activity is null and it seems that it randomly can be null. It seems like ongoing issue on react native side: facebook/react-native#37518, facebook/react-native#18345. The useAnimatedKeyboard hook won't work when the app when current activity is null, but it should not crash the app anymore. Our assumption is that most of the libs handle it this way (#5892), so it must be some corner case when most functionality won't work - that's why we don't try to recover from this state.

cspell.json Outdated Show resolved Hide resolved
Copy link
Contributor

@szydlovsky szydlovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :shipit:

@piaskowyk piaskowyk self-requested a review May 20, 2024 09:43
Copy link
Member

@piaskowyk piaskowyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small change and we can merge 🫡

…sInsetsManager.java

Co-authored-by: Krzysztof Piaskowy <krzysztof.piaskowy@swmansion.com>
@maciekstosio maciekstosio added this pull request to the merge queue Jun 3, 2024
Merged via the queue into main with commit a2db53d Jun 3, 2024
9 checks passed
@maciekstosio maciekstosio deleted the @maciekstosio/Fix-crash-when-current-activity-is-null branch June 3, 2024 09:49
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.

method 'android.view.Window android.app.Activity.getWindow()' on a null object reference
3 participants