Support reload in ReactDelegate (#43521)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43521

Changelog:
[Android] [Added] - Support reload() in ReactDelegate

Reviewed By: cortinico

Differential Revision: D54967602

fbshipit-source-id: adfa200cabcbecf9507775ac38f17c9d01b2671a
This commit is contained in:
Arushi Kesarwani
2024-03-25 10:45:00 +00:00
committed by Nicola Corti
parent 36d64312c8
commit 0e5ba6db2d
2 changed files with 8 additions and 0 deletions
@@ -159,6 +159,7 @@ public class com/facebook/react/ReactDelegate {
public fun onKeyLongPress (I)Z
public fun onNewIntent (Landroid/content/Intent;)Z
public fun onWindowFocusChanged (Z)V
public fun reload ()V
public fun shouldShowDevMenuOrReload (ILandroid/view/KeyEvent;)Z
}
@@ -229,6 +229,13 @@ public class ReactDelegate {
return false;
}
public void reload() {
DevSupportManager devSupportManager = getDevSupportManager();
if (devSupportManager != null) {
devSupportManager.handleReloadJS();
}
}
public void loadApp() {
loadApp(mMainComponentName);
}