From 0eff2c5a229d32b65ee51d9629414c64d3b3df2b Mon Sep 17 00:00:00 2001 From: David Vacca Date: Tue, 19 Nov 2024 22:28:00 -0800 Subject: [PATCH] Update javadoc for ReactHost.destroy() method (#47741) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47741 Update javadoc for ReactHost.destroy() method changelog: [internal] internal Reviewed By: shwanton Differential Revision: D66215193 fbshipit-source-id: 836c8383f5bb2ffd14b46e498be74b6ed79b4402 --- .../ReactAndroid/src/main/java/com/facebook/react/ReactHost.kt | 3 ++- .../main/java/com/facebook/react/runtime/ReactHostImpl.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactHost.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactHost.kt index 04a83dff306..965fa2fb0b9 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactHost.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactHost.kt @@ -140,7 +140,8 @@ public interface ReactHost { * @param reason describing why ReactHost is being destroyed (e.g. memory pressure) * @param ex exception that caused the trigger to destroy ReactHost (or null) This exception will * be used to log properly the cause of destroy operation. - * @param onDestroyFinished callback that will be called when React Native gets destroyed. + * @param onDestroyFinished callback that will be called when React Native gets destroyed, the + * callback will run on a background thread. * @return A task that completes when React Native gets destroyed. */ public fun destroy( diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java index 9544cab563b..3b00991b649 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java @@ -562,7 +562,8 @@ public class ReactHostImpl implements ReactHost { * @param reason describing why ReactHost is being destroyed (e.g. memory pressure) * @param ex exception that caused the trigger to destroy ReactHost (or null) This exception will * be used to log properly the cause of destroy operation. - * @param onDestroyFinished callback that will be called when React Native gets destroyed. + * @param onDestroyFinished callback that will be called when React Native gets destroyed, the + * callback will run on a background thread. * @return A task that completes when React Native gets destroyed. */ @NonNull