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.
Reviewed By: javache, mdvacca
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
@@ -2017,35 +2017,35 @@ public abstract interface class com/facebook/react/devsupport/DevServerHelper$Pa
2017
2017
}
2018
2018
2019
2019
public abstract class com/facebook/react/devsupport/DevSupportManagerBase : com/facebook/react/devsupport/interfaces/DevSupportManager {
2020
-
protected final field mReactInstanceDevHelper Lcom/facebook/react/devsupport/ReactInstanceDevHelper;
2020
+
public static final field Companion Lcom/facebook/react/devsupport/DevSupportManagerBase$Companion;
2021
2021
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
2022
2022
public fun addCustomDevOption (Ljava/lang/String;Lcom/facebook/react/devsupport/interfaces/DevOptionHandler;)V
2023
2023
public fun createRootView (Ljava/lang/String;)Landroid/view/View;
2024
2024
public fun createSurfaceDelegate (Ljava/lang/String;)Lcom/facebook/react/common/SurfaceDelegate;
2025
2025
public fun destroyRootView (Landroid/view/View;)V
2026
2026
public fun downloadBundleResourceFromUrlSync (Ljava/lang/String;Ljava/io/File;)Ljava/io/File;
2027
-
public fun fetchSplitBundleAndCreateBundleLoader (Ljava/lang/String;Lcom/facebook/react/devsupport/DevSupportManagerBase$CallbackWithBundleLoader;)V
2028
-
protected fun getApplicationContext ()Landroid/content/Context;
2027
+
public final fun fetchSplitBundleAndCreateBundleLoader (Ljava/lang/String;Lcom/facebook/react/devsupport/DevSupportManagerBase$CallbackWithBundleLoader;)V
2028
+
protected final fun getApplicationContext ()Landroid/content/Context;
2029
2029
public fun getCurrentActivity ()Landroid/app/Activity;
2030
-
public fun getCurrentReactContext ()Lcom/facebook/react/bridge/ReactContext;
2031
-
public fun getDevLoadingViewManager ()Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;
2032
-
public fun getDevServerHelper ()Lcom/facebook/react/devsupport/DevServerHelper;
2033
-
public fun getDevSettings ()Lcom/facebook/react/modules/debug/interfaces/DeveloperSettings;
2034
-
public fun getDevSupportEnabled ()Z
2030
+
public final fun getCurrentReactContext ()Lcom/facebook/react/bridge/ReactContext;
2031
+
public final fun getDevLoadingViewManager ()Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;
2032
+
public final fun getDevServerHelper ()Lcom/facebook/react/devsupport/DevServerHelper;
2033
+
public final fun getDevSettings ()Lcom/facebook/react/modules/debug/interfaces/DeveloperSettings;
2034
+
public final fun getDevSupportEnabled ()Z
2035
2035
public fun getDownloadedJSBundleFile ()Ljava/lang/String;
2036
-
public fun getJSAppBundleName ()Ljava/lang/String;
2037
-
public fun getLastErrorCookie ()I
2038
-
public fun getLastErrorStack ()[Lcom/facebook/react/devsupport/interfaces/StackFrame;
2039
-
public fun getLastErrorTitle ()Ljava/lang/String;
2040
-
public fun getLastErrorType ()Lcom/facebook/react/devsupport/interfaces/ErrorType;
2041
-
public fun getReactInstanceDevHelper ()Lcom/facebook/react/devsupport/ReactInstanceDevHelper;
2036
+
public final fun getJSAppBundleName ()Ljava/lang/String;
2037
+
public final fun getLastErrorCookie ()I
2038
+
public final fun getLastErrorStack ()[Lcom/facebook/react/devsupport/interfaces/StackFrame;
2039
+
public final fun getLastErrorTitle ()Ljava/lang/String;
2040
+
public final fun getLastErrorType ()Lcom/facebook/react/devsupport/interfaces/ErrorType;
2041
+
public final fun getReactInstanceDevHelper ()Lcom/facebook/react/devsupport/ReactInstanceDevHelper;
2042
2042
public fun getRedBoxHandler ()Lcom/facebook/react/devsupport/interfaces/RedBoxHandler;
2043
2043
public fun getSourceMapUrl ()Ljava/lang/String;
2044
2044
public fun getSourceUrl ()Ljava/lang/String;
2045
2045
protected abstract fun getUniqueTag ()Ljava/lang/String;
2046
2046
public fun handleException (Ljava/lang/Exception;)V
2047
2047
public fun hasUpToDateJSBundleInCache ()Z
2048
-
protected fun hideDevLoadingView ()V
2048
+
protected final fun hideDevLoadingView ()V
2049
2049
public fun hidePausedInDebuggerOverlay ()V
2050
2050
public fun hideRedboxDialog ()V
2051
2051
public fun isPackagerRunning (Lcom/facebook/react/devsupport/interfaces/PackagerStatusCallback;)V
@@ -2057,11 +2057,16 @@ public abstract class com/facebook/react/devsupport/DevSupportManagerBase : com/
2057
2057
public fun reloadJSFromServer (Ljava/lang/String;Lcom/facebook/react/devsupport/interfaces/BundleLoadCallback;)V
2058
2058
public fun reloadSettings ()V
2059
2059
public fun setAdditionalOptionForPackager (Ljava/lang/String;Ljava/lang/String;)V
2060
-
public fun setDevSupportEnabled (Z)V
2060
+
public final fun setDevLoadingViewManager (Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;)V
2061
+
public final fun setDevSupportEnabled (Z)V
2061
2062
public fun setFpsDebugEnabled (Z)V
2062
2063
public fun setHotModuleReplacementEnabled (Z)V
2064
+
public final fun setLastErrorCookie (I)V
2065
+
public final fun setLastErrorStack ([Lcom/facebook/react/devsupport/interfaces/StackFrame;)V
2066
+
public final fun setLastErrorTitle (Ljava/lang/String;)V
2067
+
public final fun setLastErrorType (Lcom/facebook/react/devsupport/interfaces/ErrorType;)V
2063
2068
public fun setPackagerLocationCustomizer (Lcom/facebook/react/devsupport/interfaces/DevSupportManager$PackagerLocationCustomizer;)V
2064
-
protected fun showDevLoadingViewForRemoteJSEnabled ()V
2069
+
protected final fun showDevLoadingViewForRemoteJSEnabled ()V
2065
2070
public fun showDevOptionsDialog ()V
2066
2071
public fun showNewJSError (Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;I)V
2067
2072
public fun showNewJavaError (Ljava/lang/String;Ljava/lang/Throwable;)V
@@ -2076,6 +2081,9 @@ public abstract interface class com/facebook/react/devsupport/DevSupportManagerB
2076
2081
public abstract fun onSuccess (Lcom/facebook/react/bridge/JSBundleLoader;)V
2077
2082
}
2078
2083
2084
+
public final class com/facebook/react/devsupport/DevSupportManagerBase$Companion {
2085
+
}
2086
+
2079
2087
public abstract interface class com/facebook/react/devsupport/DevSupportManagerFactory {
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;)Lcom/facebook/react/devsupport/interfaces/DevSupportManager;
2081
2089
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