You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate to Kotlin - DevSupportManagerBase.kt (#50559)
Summary:
Pull Request resolved: #50559
This diff migrates the following file to Kotlin - DevSupportManagerBase.kt
as part of our ongoing effort of migrating the codebase to Kotlin
This file was 1000LOC+ so its migration is quite involved.
I had to look into nullability of various parameters. Most notably the `Array<StackFrame?>` -> `Array<StackFrame>`.
This also is the last file left in the devsupport package that needs to be migrated to Kotlin.
Changelog:
[Android] [Breaking] - DevSupportManagerBase is now converted to Kotlin. If you're subclassing this class, you will have to adjust some of the parameters as types have changed during the migration.
Differential Revision: D72637098
Copy file name to clipboardExpand all lines: packages/react-native/ReactAndroid/api/ReactAndroid.api
+25-17Lines changed: 25 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -2016,35 +2016,35 @@ public abstract interface class com/facebook/react/devsupport/DevServerHelper$Pa
2016
2016
}
2017
2017
2018
2018
public abstract class com/facebook/react/devsupport/DevSupportManagerBase : com/facebook/react/devsupport/interfaces/DevSupportManager {
2019
-
protected final field mReactInstanceDevHelper Lcom/facebook/react/devsupport/ReactInstanceDevHelper;
2019
+
public static final field Companion Lcom/facebook/react/devsupport/DevSupportManagerBase$Companion;
2020
2020
public fun <init> (Landroid/content/Context;Lcom/facebook/react/devsupport/ReactInstanceDevHelper;Ljava/lang/String;ZLcom/facebook/react/devsupport/interfaces/RedBoxHandler;Lcom/facebook/react/devsupport/interfaces/DevBundleDownloadListener;ILjava/util/Map;Lcom/facebook/react/common/SurfaceDelegateFactory;Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;Lcom/facebook/react/devsupport/interfaces/PausedInDebuggerOverlayManager;)V
2021
2021
public fun addCustomDevOption (Ljava/lang/String;Lcom/facebook/react/devsupport/interfaces/DevOptionHandler;)V
2022
2022
public fun createRootView (Ljava/lang/String;)Landroid/view/View;
2023
2023
public fun createSurfaceDelegate (Ljava/lang/String;)Lcom/facebook/react/common/SurfaceDelegate;
2024
2024
public fun destroyRootView (Landroid/view/View;)V
2025
2025
public fun downloadBundleResourceFromUrlSync (Ljava/lang/String;Ljava/io/File;)Ljava/io/File;
2026
-
public fun fetchSplitBundleAndCreateBundleLoader (Ljava/lang/String;Lcom/facebook/react/devsupport/DevSupportManagerBase$CallbackWithBundleLoader;)V
2027
-
protected fun getApplicationContext ()Landroid/content/Context;
2026
+
public final fun fetchSplitBundleAndCreateBundleLoader (Ljava/lang/String;Lcom/facebook/react/devsupport/DevSupportManagerBase$CallbackWithBundleLoader;)V
2027
+
protected final fun getApplicationContext ()Landroid/content/Context;
2028
2028
public fun getCurrentActivity ()Landroid/app/Activity;
2029
-
public fun getCurrentReactContext ()Lcom/facebook/react/bridge/ReactContext;
2030
-
public fun getDevLoadingViewManager ()Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;
2031
-
public fun getDevServerHelper ()Lcom/facebook/react/devsupport/DevServerHelper;
2032
-
public fun getDevSettings ()Lcom/facebook/react/modules/debug/interfaces/DeveloperSettings;
2033
-
public fun getDevSupportEnabled ()Z
2029
+
public final fun getCurrentReactContext ()Lcom/facebook/react/bridge/ReactContext;
2030
+
public final fun getDevLoadingViewManager ()Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;
2031
+
public final fun getDevServerHelper ()Lcom/facebook/react/devsupport/DevServerHelper;
2032
+
public final fun getDevSettings ()Lcom/facebook/react/modules/debug/interfaces/DeveloperSettings;
2033
+
public final fun getDevSupportEnabled ()Z
2034
2034
public fun getDownloadedJSBundleFile ()Ljava/lang/String;
2035
-
public fun getJSAppBundleName ()Ljava/lang/String;
2036
-
public fun getLastErrorCookie ()I
2037
-
public fun getLastErrorStack ()[Lcom/facebook/react/devsupport/interfaces/StackFrame;
2038
-
public fun getLastErrorTitle ()Ljava/lang/String;
2039
-
public fun getLastErrorType ()Lcom/facebook/react/devsupport/interfaces/ErrorType;
2040
-
public fun getReactInstanceDevHelper ()Lcom/facebook/react/devsupport/ReactInstanceDevHelper;
2035
+
public final fun getJSAppBundleName ()Ljava/lang/String;
2036
+
public final fun getLastErrorCookie ()I
2037
+
public final fun getLastErrorStack ()[Lcom/facebook/react/devsupport/interfaces/StackFrame;
2038
+
public final fun getLastErrorTitle ()Ljava/lang/String;
2039
+
public final fun getLastErrorType ()Lcom/facebook/react/devsupport/interfaces/ErrorType;
2040
+
public final fun getReactInstanceDevHelper ()Lcom/facebook/react/devsupport/ReactInstanceDevHelper;
2041
2041
public fun getRedBoxHandler ()Lcom/facebook/react/devsupport/interfaces/RedBoxHandler;
2042
2042
public fun getSourceMapUrl ()Ljava/lang/String;
2043
2043
public fun getSourceUrl ()Ljava/lang/String;
2044
2044
protected abstract fun getUniqueTag ()Ljava/lang/String;
2045
2045
public fun handleException (Ljava/lang/Exception;)V
2046
2046
public fun hasUpToDateJSBundleInCache ()Z
2047
-
protected fun hideDevLoadingView ()V
2047
+
protected final fun hideDevLoadingView ()V
2048
2048
public fun hidePausedInDebuggerOverlay ()V
2049
2049
public fun hideRedboxDialog ()V
2050
2050
public fun isPackagerRunning (Lcom/facebook/react/devsupport/interfaces/PackagerStatusCallback;)V
@@ -2056,11 +2056,16 @@ public abstract class com/facebook/react/devsupport/DevSupportManagerBase : com/
2056
2056
public fun reloadJSFromServer (Ljava/lang/String;Lcom/facebook/react/devsupport/interfaces/BundleLoadCallback;)V
2057
2057
public fun reloadSettings ()V
2058
2058
public fun setAdditionalOptionForPackager (Ljava/lang/String;Ljava/lang/String;)V
2059
-
public fun setDevSupportEnabled (Z)V
2059
+
public final fun setDevLoadingViewManager (Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;)V
2060
+
public final fun setDevSupportEnabled (Z)V
2060
2061
public fun setFpsDebugEnabled (Z)V
2061
2062
public fun setHotModuleReplacementEnabled (Z)V
2063
+
public final fun setLastErrorCookie (I)V
2064
+
public final fun setLastErrorStack ([Lcom/facebook/react/devsupport/interfaces/StackFrame;)V
2065
+
public final fun setLastErrorTitle (Ljava/lang/String;)V
2066
+
public final fun setLastErrorType (Lcom/facebook/react/devsupport/interfaces/ErrorType;)V
2062
2067
public fun setPackagerLocationCustomizer (Lcom/facebook/react/devsupport/interfaces/DevSupportManager$PackagerLocationCustomizer;)V
2063
-
protected fun showDevLoadingViewForRemoteJSEnabled ()V
2068
+
protected final fun showDevLoadingViewForRemoteJSEnabled ()V
2064
2069
public fun showDevOptionsDialog ()V
2065
2070
public fun showNewJSError (Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;I)V
2066
2071
public fun showNewJavaError (Ljava/lang/String;Ljava/lang/Throwable;)V
@@ -2075,6 +2080,9 @@ public abstract interface class com/facebook/react/devsupport/DevSupportManagerB
2075
2080
public abstract fun onSuccess (Lcom/facebook/react/bridge/JSBundleLoader;)V
2076
2081
}
2077
2082
2083
+
public final class com/facebook/react/devsupport/DevSupportManagerBase$Companion {
2084
+
}
2085
+
2078
2086
public abstract interface class com/facebook/react/devsupport/DevSupportManagerFactory {
2079
2087
public abstract fun create (Landroid/content/Context;Lcom/facebook/react/devsupport/ReactInstanceDevHelper;Ljava/lang/String;ZLcom/facebook/react/devsupport/interfaces/RedBoxHandler;Lcom/facebook/react/devsupport/interfaces/DevBundleDownloadListener;ILjava/util/Map;Lcom/facebook/react/common/SurfaceDelegateFactory;Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;Lcom/facebook/react/devsupport/interfaces/PausedInDebuggerOverlayManager;)Lcom/facebook/react/devsupport/interfaces/DevSupportManager;
2080
2088
public abstract fun create (Landroid/content/Context;Lcom/facebook/react/devsupport/ReactInstanceDevHelper;Ljava/lang/String;ZLcom/facebook/react/devsupport/interfaces/RedBoxHandler;Lcom/facebook/react/devsupport/interfaces/DevBundleDownloadListener;ILjava/util/Map;Lcom/facebook/react/common/SurfaceDelegateFactory;Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;Lcom/facebook/react/devsupport/interfaces/PausedInDebuggerOverlayManager;Z)Lcom/facebook/react/devsupport/interfaces/DevSupportManager;
Copy file name to clipboardExpand all lines: packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgelessDevSupportManager.kt
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -71,17 +71,17 @@ internal class BridgelessDevSupportManager(
0 commit comments