Skip to content

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.

@maciekstosio maciekstosio requested a review from szydlovsky May 16, 2024 10:01
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 <[email protected]>
@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
@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