Patch release fixing an Android crash that hit users capturing GL / SurfaceView / TextureView roots directly.
What changed
- fix(android) Guard
applyTransformationsagainstNullPointerExceptionandClassCastExceptionwhen the captured view is itself a non-ViewGroup(e.g. aSurfaceViewcaptured directly withhandleGLSurfaceView: true). The original parent walk ran pastrootand either dereferenced a null parent or tried to cast aViewRootImpltoView. The walk is now extracted into awalkAncestorshelper that short-circuits whenchild == root, stops on null, and stops on non-ViewViewParent. Closes #488. (#631) - test(android) First JUnit + Mockito unit tests for the library, wired into the existing
build-androidCI job via./gradlew :react-native-view-shot:testDebugUnitTest. Covers the three failure modes plus happy paths. (#631)
Contributors
Full changelog: v5.0.0...v5.0.1