fix(android): bump androidx.collection to 1.4.4 to avoid MutableIntObjectMap corruption in SurfaceMountingManager (#58389)

Summary:
since https://github.com/react/react-native/issues/56646 the view registry is a `MutableIntObjectMap`; `androidx.collection` 1.4.0 to 1.4.2 corrupt `ScatterMap` and its primitive variants after remove-heavy sequences, fixed in 1.4.3 (https://issuetracker.google.com/issues/352560465). Apps resolve 1.4.0 or 1.4.2 and lose registry entries; RN then drops mount instructions and can leave stale views.

Fixes https://github.com/react/react-native/issues/58388.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

`[ANDROID] [FIXED] - Bump androidx.collection to 1.4.4 to fix view registry entries getting lost in SurfaceMountingManager`

Pull Request resolved: https://github.com/react/react-native/pull/58389

Test Plan:
Reproducer: https://github.com/pawicao/rn-android-view-registry-corruption
- RN 0.87.1 app resolving androidx.collection 1.4.2: 91 `Unable to find viewState` soft exceptions on 45 tags over two 40-round runs on a Pixel 9a, and a stale view left on screen.
- Same screen with androidx.collection pinned to 1.4.4: none over 120 rounds.

Reviewed By: cortinico

Differential Revision: D119149754

Pulled By: javache

fbshipit-source-id: afb13330bac575218a07a030bb1bcd5bf7e00824
This commit is contained in:
Oskar Pawica authored and meta-codesync[bot] committed 2026-09-08 04:26:36 -07:00
1 parent 25b6fd57ff
commit d6a5f159c6
1 file changed
+1 -1
@@ -10,7 +10,7 @@ agp = "9.2.1"
androidx-annotation = "1.6.0"
androidx-appcompat = "1.7.0"
androidx-autofill = "1.3.0"
androidx-collection = "1.4.0"
androidx-collection = "1.4.4"
androidx-benchmark-macro-junit4 = "1.3.3"
androidx-profileinstaller = "1.4.1"
androidx-swiperefreshlayout = "1.1.0"