Commit f59a6f9
Do not crash inside getEncodedScreenSizeWithoutVerticalInsets if SurfaceMountingManager is null (#53752)
Summary:
Pull Request resolved: #53752
Currently we `Objects.requireNotNull` on the `SurfaceMountingManager` inside the `getEncodedScreenSizeWithoutVerticalInsets`
function. However the `SurfaceMountingManager` could be null.
In that scenario, I'm returning 0 here (that will restore the old broken behavior, with the modal rendering on the top left corner for the first frame), instead of letting the app crash.
Changelog:
[Android] [Fixed] - Do not crash inside getEncodedScreenSizeWithoutVerticalInsets if SurfaceMountingManager is null
Reviewed By: javache
Differential Revision: D82225855
fbshipit-source-id: df84db612e77b6b981bc28afc0d293867b5d3b2e1 parent 91d427f commit f59a6f9
File tree
1 file changed
+11
-6
lines changed- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric
1 file changed
+11
-6
lines changedLines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | 102 | | |
104 | 103 | | |
105 | 104 | | |
| |||
738 | 737 | | |
739 | 738 | | |
740 | 739 | | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
746 | 751 | | |
747 | 752 | | |
748 | 753 | | |
| |||
0 commit comments