Commit d984dea
Add @nullable to ScrollView getChildVisibleRect offset parameter
Summary:
The `offset` parameter in `getChildVisibleRect` overrides was missing the
`Nullable` annotation. The Android framework contract for
`ViewGroup.getChildVisibleRect(View, Rect, Point)` allows `offset` to be null,
and `View.getGlobalVisibleRect(Rect)` legitimately passes null. The `Nullsafe`
instrumentation injected a non-null assertion that crashed when null was passed.
Changelog:
[Android][Fixed] - Fix NullPointerException in ScrollView `getChildVisibleRect` when `offset` is null
Differential Revision: D1075079351 parent 3fd8e9b commit d984dea
3 files changed
Lines changed: 3 additions & 3 deletions
File tree
- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1054 | 1054 | | |
1055 | 1055 | | |
1056 | 1056 | | |
1057 | | - | |
| 1057 | + | |
1058 | 1058 | | |
1059 | 1059 | | |
1060 | 1060 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
810 | | - | |
| 810 | + | |
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
799 | 799 | | |
800 | 800 | | |
801 | 801 | | |
802 | | - | |
| 802 | + | |
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
| |||
0 commit comments