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

ReactHost: Make ReactInstanceEventListener APIs public #45149

Closed
wants to merge 1 commit into from
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 @@ -208,6 +208,7 @@ public class com/facebook/react/ReactFragment$Builder {

public abstract interface class com/facebook/react/ReactHost {
public abstract fun addBeforeDestroyListener (Lkotlin/jvm/functions/Function0;)V
public abstract fun addReactInstanceEventListener (Lcom/facebook/react/ReactInstanceEventListener;)V
public abstract fun createSurface (Landroid/content/Context;Ljava/lang/String;Landroid/os/Bundle;)Lcom/facebook/react/interfaces/fabric/ReactSurface;
public abstract fun destroy (Ljava/lang/String;Ljava/lang/Exception;)Lcom/facebook/react/interfaces/TaskInterface;
public abstract fun getCurrentReactContext ()Lcom/facebook/react/bridge/ReactContext;
Expand All @@ -230,6 +231,7 @@ public abstract interface class com/facebook/react/ReactHost {
public abstract fun onWindowFocusChange (Z)V
public abstract fun reload (Ljava/lang/String;)Lcom/facebook/react/interfaces/TaskInterface;
public abstract fun removeBeforeDestroyListener (Lkotlin/jvm/functions/Function0;)V
public abstract fun removeReactInstanceEventListener (Lcom/facebook/react/ReactInstanceEventListener;)V
public abstract fun setJsEngineResolutionAlgorithm (Lcom/facebook/react/JSEngineResolutionAlgorithm;)V
public abstract fun start ()Lcom/facebook/react/interfaces/TaskInterface;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,10 @@ public interface ReactHost {
public fun addBeforeDestroyListener(onBeforeDestroy: () -> Unit)

public fun removeBeforeDestroyListener(onBeforeDestroy: () -> Unit)

/** Add a listener to be notified of ReactInstance events. */
public fun addReactInstanceEventListener(listener: ReactInstanceEventListener)

/** Remove a listener previously added with {@link #addReactInstanceEventListener}. */
public fun removeReactInstanceEventListener(listener: ReactInstanceEventListener)
}
Loading