From 0edc2f08e157ac7becc17249633141881f12e585 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Thu, 15 Jun 2023 22:34:36 -0700 Subject: [PATCH] Refactor ReactApplication to support ReactHostInterface Summary: This diff refactors ReactApplication to support ReactHostInterface, the goal is to be able to use this interface to integrate bridgeless in RN Tester app bypass-github-export-checks changelog: [internal] internal Reviewed By: cortinico Differential Revision: D46770419 fbshipit-source-id: b3e88b12aab6287396b16b277f906026a07acad6 --- .../java/com/facebook/react/ReactApplication.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactApplication.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactApplication.java index 3d7ce471d11..b8abe0cf169 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactApplication.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactApplication.java @@ -7,8 +7,20 @@ package com.facebook.react; +import androidx.annotation.Nullable; +import com.facebook.react.interfaces.ReactHostInterface; + +/** Interface that represents an instance of a React Native application */ public interface ReactApplication { /** Get the default {@link ReactNativeHost} for this app. */ ReactNativeHost getReactNativeHost(); + + /** + * Get the default {@link ReactHostInterface} for this app. This method will be used by the new + * architecture of react native + */ + default @Nullable ReactHostInterface getReactHostInterface() { + return null; + } }