software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
8.6k stars 1.26k forks source link

Set default keyboard state #6101

Closed piaskowyk closed 3 weeks ago

piaskowyk commented 3 weeks ago

Summary

This PR addresses a requested issue that randomly occurs on some Android devices:

java.lang.NullPointerException: Attempt to invoke virtual method 'int com.swmansion.reanimated.keyboard.KeyboardState.asInt()' on a null object reference
        at com.swmansion.reanimated.keyboard.KeyboardAnimationManager.notifyAboutKeyboardChange(KeyboardAnimationManager.java:45)

This NullPointerException was likely caused by the lack of a default value for the mState field.