Commit aefb769
Fix accessibilityLabelledBy crash on empty array
Summary:
Fixes a crash in `BaseViewManager.setAccessibilityLabelledBy` when an empty array is passed. The method now guards against accessing index 0 on empty arrays and properly clears the tag when null or empty arrays are provided, instead of leaving stale associations.
## Changelog
[Android][Fixed] - Issue when clearing accessibilityLabelledBy
Reviewed By: bvanderhoof
Differential Revision: D1071273881 parent 7f396d1 commit aefb769
2 files changed
Lines changed: 31 additions & 2 deletions
File tree
- packages/react-native/ReactAndroid/src
- main/java/com/facebook/react/uimanager
- test/java/com/facebook/react/uimanager
packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
| 313 | + | |
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
320 | | - | |
| 321 | + | |
| 322 | + | |
321 | 323 | | |
322 | 324 | | |
323 | 325 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
104 | 131 | | |
0 commit comments