From 64eea4ee8ccc3f40b90e47704bd76dce1d9db2a6 Mon Sep 17 00:00:00 2001 From: Shawn Dempsey Date: Tue, 6 Aug 2024 22:34:52 -0700 Subject: [PATCH] ReactRootView.createRootView should be @nullable (#45924) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45924 **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 --- .../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 a97ca10328ed..9ca16398b40d 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 ReactActivityDelegate( * *

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