Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose ReactDelegate for react-native-restart #43588

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public abstract class com/facebook/react/ReactActivity : androidx/appcompat/app/
protected fun <init> ()V
protected fun createReactActivityDelegate ()Lcom/facebook/react/ReactActivityDelegate;
protected fun getMainComponentName ()Ljava/lang/String;
public fun getReactDelegate ()V
protected final fun getReactInstanceManager ()Lcom/facebook/react/ReactInstanceManager;
protected final fun getReactNativeHost ()Lcom/facebook/react/ReactNativeHost;
public fun invokeDefaultOnBackPressed ()V
Expand Down Expand Up @@ -113,6 +114,7 @@ public class com/facebook/react/ReactActivityDelegate {
protected fun getLaunchOptions ()Landroid/os/Bundle;
public fun getMainComponentName ()Ljava/lang/String;
protected fun getPlainActivity ()Landroid/app/Activity;
protected fun getReactDelegate ()Lcom/facebook/react/ReactDelegate;
public fun getReactHost ()Lcom/facebook/react/ReactHost;
public fun getReactInstanceManager ()Lcom/facebook/react/ReactInstanceManager;
protected fun getReactNativeHost ()Lcom/facebook/react/ReactNativeHost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ protected void onDestroy() {
mDelegate.onDestroy();
}

public void getReactDelegate() {
mDelegate.getReactDelegate();
}

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ public ReactHost getReactHost() {
return ((ReactApplication) getPlainActivity().getApplication()).getReactHost();
}

protected @Nullable ReactDelegate getReactDelegate() {
return mReactDelegate;
}

public ReactInstanceManager getReactInstanceManager() {
return mReactDelegate.getReactInstanceManager();
}
Expand Down
Loading