From ff7e24f19aade46e3ed616d65b725ed14a12d902 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Mon, 23 Jun 2025 07:24:47 -0700 Subject: [PATCH] @DoNotStrip ReactModalHostView to prevent instacrash on release (#52195) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52195 RNTester is currently instacrashing on release due to use minifying the `ReactModalHostView`. In that class there is a static method that is accessed by JNI so we should annotated this class as `DoNotStrip` as otherwise we won't be able to access it. Changelog: [Internal] [Changed] - Reviewed By: cipolleschi Differential Revision: D77148010 fbshipit-source-id: c5b2758fa2919bc1f5885433202a45b4c3f8ff99 --- .../java/com/facebook/react/views/modal/ReactModalHostView.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt index 7f2798ae02e..8408b838154 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt @@ -70,6 +70,7 @@ import com.facebook.yoga.annotations.DoNotStrip * addition and removal of views to the DialogRootViewGroup. */ @SuppressLint("ViewConstructor") +@DoNotStrip public class ReactModalHostView(context: ThemedReactContext) : ViewGroup(context), LifecycleEventListener {