Skip to content

Commit 0bd0635

Browse files
cortinicofacebook-github-bot
authored andcommitted
Migrate to Kotlin - DevSupportManagerFactory (#50516)
Summary: Pull Request resolved: #50516 This diff migrates the following file to Kotlin - DevSupportManagerFactory as part of our ongoing effort of migrating the codebase to Kotlin Changelog: [Android] [Changed] - Migrate to Kotlin - DevSupportManagerFactory - We couldn't find any implementation of this class in OSS. Some Kotlin implementers might have to change the method signatures. However this interface is not supposed to be extended in OSS. Reviewed By: javache Differential Revision: D72556310 fbshipit-source-id: 35d1ed3c332296d3be5244fdab92a890d7ea3c40
1 parent 0949207 commit 0bd0635

File tree

3 files changed

+58
-57
lines changed

3 files changed

+58
-57
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ internal class DefaultDevSupportManagerFactory : DevSupportManagerFactory {
9595
redBoxHandler: RedBoxHandler?,
9696
devBundleDownloadListener: DevBundleDownloadListener?,
9797
minNumShakes: Int,
98-
customPackagerCommandHandlers: MutableMap<String, RequestHandler>?,
98+
customPackagerCommandHandlers: Map<String, RequestHandler>?,
9999
surfaceDelegateFactory: SurfaceDelegateFactory?,
100100
devLoadingViewManager: DevLoadingViewManager?,
101101
pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?,

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

-56
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
package com.facebook.react.devsupport
9+
10+
import android.content.Context
11+
import com.facebook.react.common.SurfaceDelegateFactory
12+
import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener
13+
import com.facebook.react.devsupport.interfaces.DevLoadingViewManager
14+
import com.facebook.react.devsupport.interfaces.DevSupportManager
15+
import com.facebook.react.devsupport.interfaces.PausedInDebuggerOverlayManager
16+
import com.facebook.react.devsupport.interfaces.RedBoxHandler
17+
import com.facebook.react.packagerconnection.RequestHandler
18+
19+
public interface DevSupportManagerFactory {
20+
21+
/**
22+
* Factory used by the Old Architecture flow to create a [DevSupportManager] and a
23+
* [BridgeDevSupportManager]
24+
*/
25+
public fun create(
26+
applicationContext: Context,
27+
reactInstanceManagerHelper: ReactInstanceDevHelper,
28+
packagerPathForJSBundleName: String?,
29+
enableOnCreate: Boolean,
30+
redBoxHandler: RedBoxHandler?,
31+
devBundleDownloadListener: DevBundleDownloadListener?,
32+
minNumShakes: Int,
33+
customPackagerCommandHandlers: Map<String, RequestHandler>?,
34+
surfaceDelegateFactory: SurfaceDelegateFactory?,
35+
devLoadingViewManager: DevLoadingViewManager?,
36+
pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?
37+
): DevSupportManager
38+
39+
/**
40+
* Factory used by the New Architecture/Bridgeless flow to create a [DevSupportManager] and a
41+
* [BridgelessDevSupportManager]
42+
*/
43+
public fun create(
44+
applicationContext: Context,
45+
reactInstanceManagerHelper: ReactInstanceDevHelper,
46+
packagerPathForJSBundleName: String?,
47+
enableOnCreate: Boolean,
48+
redBoxHandler: RedBoxHandler?,
49+
devBundleDownloadListener: DevBundleDownloadListener?,
50+
minNumShakes: Int,
51+
customPackagerCommandHandlers: Map<String, RequestHandler>?,
52+
surfaceDelegateFactory: SurfaceDelegateFactory?,
53+
devLoadingViewManager: DevLoadingViewManager?,
54+
pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?,
55+
useDevSupport: Boolean
56+
): DevSupportManager
57+
}

0 commit comments

Comments
 (0)