From 6a1ecbb2bb3942e7487532262f2a4fc55f94fcad Mon Sep 17 00:00:00 2001 From: Shawn Dempsey Date: Wed, 7 Aug 2024 16:42:54 -0700 Subject: [PATCH] ReactRootView.createRootView should be @nullable (#45924) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45924 Changelog: [android][fixed] Anntate ReactRootView.createRootView with nullable **Context** - D54772205 changed `createRootView` to return `null` - https://www.internalfb.com/diff/D60803470?dst_version_fbid=533309559035246&transaction_fbid=475433162004889 **Change** - Annotate `createRootView` with `Nullable` Reviewed By: mdvacca Differential Revision: D60867547 fbshipit-source-id: 12c325cb9a2dd6db4b2388b2ad3c2af13065d371 --- .../src/main/java/com/facebook/react/ReactActivityDelegate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java index a97ca10328e..9ca16398b40 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java @@ -70,7 +70,7 @@ public class ReactActivityDelegate { * *

Not used on bridgeless */ - protected ReactRootView createRootView() { + protected @Nullable ReactRootView createRootView() { return null; }