From 417c5c644af7eb308990daebd116486449f9c71a 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 f99a973c603..9e895bdb128 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 @@ -69,6 +69,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 {