From cbddcfc6911101608df36f2a8d047768296c63b2 Mon Sep 17 00:00:00 2001 From: Eric Rozell Date: Thu, 12 Sep 2024 14:34:46 -0700 Subject: [PATCH] ReactRootView is Nullable in ReactDelegate (#46440) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46440 ReactDelegate does not properly annotate the ReactRootView field as Nullable. This fixes that. ## Changelog [Android][Fixed] Use appropriate Nullable attribute for ReactRootView field in ReactDelegate Reviewed By: philIip Differential Revision: D62514424 fbshipit-source-id: e9f10899007dfe794aa081717f5a5aa7d0038181 --- .../src/main/java/com/facebook/react/ReactDelegate.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java index 66ba98fc91c6df..8cc4e172a44d74 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java @@ -29,7 +29,7 @@ public class ReactDelegate { private final Activity mActivity; - private ReactRootView mReactRootView; + @Nullable private ReactRootView mReactRootView; @Nullable private final String mMainComponentName; @@ -305,6 +305,7 @@ public void loadApp(String appKey) { } } + @Nullable public ReactRootView getReactRootView() { if (ReactFeatureFlags.enableBridgelessArchitecture) { return (ReactRootView) mReactSurface.getView();