Skip to content

Commit 026e22b

Browse files
cortinicofacebook-github-bot
authored andcommitted
Deprecate the DefaultDevSupportManagerFactory.create() method used for Old Arch (#53137)
Summary: Pull Request resolved: #53137 One of those 2 methods can be deprecated as it was used only for old architecture. We'll be removing it at some point in the future. Changelog: [Android] [Deprecated] - DefaultDevSupportManagerFactory.create() method used for Old Arch Reviewed By: rshest Differential Revision: D79806116 fbshipit-source-id: ad2d5515f93bb85e3b7c495b369078f4c66d143b
1 parent f189439 commit 026e22b

3 files changed

Lines changed: 14 additions & 0 deletions

File tree

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ public static ReactInstanceManagerBuilder builder() {
229229
return new ReactInstanceManagerBuilder();
230230
}
231231

232+
/**
233+
* @noinspection deprecation
234+
*/
232235
/* package */ ReactInstanceManager(
233236
Context applicationContext,
234237
@Nullable Activity currentActivity,

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ import com.facebook.react.packagerconnection.RequestHandler
2525
*/
2626
internal class DefaultDevSupportManagerFactory : DevSupportManagerFactory {
2727

28+
@Deprecated(
29+
"Use the other create() method with useDevSupport parameter for New Architecture. This method will be removed in a future release.",
30+
replaceWith =
31+
ReplaceWith(
32+
"create(applicationContext, reactInstanceManagerHelper, packagerPathForJSBundleName, enableOnCreate, redBoxHandler, devBundleDownloadListener, minNumShakes, customPackagerCommandHandlers, surfaceDelegateFactory, devLoadingViewManager, pausedInDebuggerOverlayManager)"))
2833
override fun create(
2934
applicationContext: Context,
3035
reactInstanceManagerHelper: ReactInstanceDevHelper,

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerFactory.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ public interface DevSupportManagerFactory {
2222
* Factory used by the Old Architecture flow to create a [DevSupportManager] and a
2323
* [BridgeDevSupportManager]
2424
*/
25+
@Deprecated(
26+
message =
27+
"Use the other create() method with useDevSupport parameter for New Architecture. This method will be removed in a future release.",
28+
replaceWith =
29+
ReplaceWith(
30+
"create(applicationContext, reactInstanceManagerHelper, packagerPathForJSBundleName, enableOnCreate, redBoxHandler, devBundleDownloadListener, minNumShakes, customPackagerCommandHandlers, surfaceDelegateFactory, devLoadingViewManager, pausedInDebuggerOverlayManager)"))
2531
public fun create(
2632
applicationContext: Context,
2733
reactInstanceManagerHelper: ReactInstanceDevHelper,

0 commit comments

Comments
 (0)