Skip to content

Commit 1b50722

Browse files
luluwu2032facebook-github-bot
authored andcommitted
Add back hasActiveCatalystInstance() and mark it as Deprecated
Summary: Previously I renamed hasActiveCatalystInstance() API in D27335055 (dfa8eb0), however this API is still used in an OSS class. In this diff hasActiveCatalystInstance() is added back and marked as Deprecated to avoid breakages and leave the migration choice to OSS users. Changelog: [Android][Changed] Mark hasActiveCatalystInstance() as Deprecated Reviewed By: yungsters Differential Revision: D27538449 fbshipit-source-id: 30f2f890580ad7f8b41908e18013234b5bac72e9
1 parent b5e649f commit 1b50722

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java

+11
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,17 @@ public CatalystInstance getCatalystInstance() {
170170
return Assertions.assertNotNull(mCatalystInstance);
171171
}
172172

173+
/**
174+
* This API has been deprecated due to naming consideration, please use hasActiveReactInstance()
175+
* instead
176+
*
177+
* @return
178+
*/
179+
@Deprecated
180+
public boolean hasActiveCatalystInstance() {
181+
return hasActiveReactInstance();
182+
}
183+
173184
/** @return true if there is an non-null, alive react native instance */
174185
public boolean hasActiveReactInstance() {
175186
return mCatalystInstance != null && !mCatalystInstance.isDestroyed();

0 commit comments

Comments
 (0)