Skip to content

Commit

Permalink
Add back hasActiveCatalystInstance() and mark it as Deprecated
Browse files Browse the repository at this point in the history
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
  • Loading branch information
luluwu2032 authored and facebook-github-bot committed Apr 2, 2021
1 parent b5e649f commit 1b50722
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,17 @@ public CatalystInstance getCatalystInstance() {
return Assertions.assertNotNull(mCatalystInstance);
}

/**
* This API has been deprecated due to naming consideration, please use hasActiveReactInstance()
* instead
*
* @return
*/
@Deprecated
public boolean hasActiveCatalystInstance() {
return hasActiveReactInstance();
}

/** @return true if there is an non-null, alive react native instance */
public boolean hasActiveReactInstance() {
return mCatalystInstance != null && !mCatalystInstance.isDestroyed();
Expand Down

0 comments on commit 1b50722

Please sign in to comment.