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
fbshipit-source-id: b87d5f17e30d69fe9c09ec9b49f96818df34ea3b
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
@@ -1996,35 +1996,35 @@ public abstract interface class com/facebook/react/devsupport/DevServerHelper$Pa
1996
1996
}
1997
1997
1998
1998
public abstract class com/facebook/react/devsupport/DevSupportManagerBase : com/facebook/react/devsupport/interfaces/DevSupportManager {
1999
-
protected final field mReactInstanceDevHelper Lcom/facebook/react/devsupport/ReactInstanceDevHelper;
1999
+
public static final field Companion Lcom/facebook/react/devsupport/DevSupportManagerBase$Companion;
2000
2000
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
2001
2001
public fun addCustomDevOption (Ljava/lang/String;Lcom/facebook/react/devsupport/interfaces/DevOptionHandler;)V
2002
2002
public fun createRootView (Ljava/lang/String;)Landroid/view/View;
2003
2003
public fun createSurfaceDelegate (Ljava/lang/String;)Lcom/facebook/react/common/SurfaceDelegate;
2004
2004
public fun destroyRootView (Landroid/view/View;)V
2005
2005
public fun downloadBundleResourceFromUrlSync (Ljava/lang/String;Ljava/io/File;)Ljava/io/File;
2006
-
public fun fetchSplitBundleAndCreateBundleLoader (Ljava/lang/String;Lcom/facebook/react/devsupport/DevSupportManagerBase$CallbackWithBundleLoader;)V
2007
-
protected fun getApplicationContext ()Landroid/content/Context;
2006
+
public final fun fetchSplitBundleAndCreateBundleLoader (Ljava/lang/String;Lcom/facebook/react/devsupport/DevSupportManagerBase$CallbackWithBundleLoader;)V
2007
+
protected final fun getApplicationContext ()Landroid/content/Context;
2008
2008
public fun getCurrentActivity ()Landroid/app/Activity;
2009
-
public fun getCurrentReactContext ()Lcom/facebook/react/bridge/ReactContext;
2010
-
public fun getDevLoadingViewManager ()Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;
2011
-
public fun getDevServerHelper ()Lcom/facebook/react/devsupport/DevServerHelper;
2012
-
public fun getDevSettings ()Lcom/facebook/react/modules/debug/interfaces/DeveloperSettings;
2013
-
public fun getDevSupportEnabled ()Z
2009
+
public final fun getCurrentReactContext ()Lcom/facebook/react/bridge/ReactContext;
2010
+
public final fun getDevLoadingViewManager ()Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;
2011
+
public final fun getDevServerHelper ()Lcom/facebook/react/devsupport/DevServerHelper;
2012
+
public final fun getDevSettings ()Lcom/facebook/react/modules/debug/interfaces/DeveloperSettings;
2013
+
public final fun getDevSupportEnabled ()Z
2014
2014
public fun getDownloadedJSBundleFile ()Ljava/lang/String;
2015
-
public fun getJSAppBundleName ()Ljava/lang/String;
2016
-
public fun getLastErrorCookie ()I
2017
-
public fun getLastErrorStack ()[Lcom/facebook/react/devsupport/interfaces/StackFrame;
2018
-
public fun getLastErrorTitle ()Ljava/lang/String;
2019
-
public fun getLastErrorType ()Lcom/facebook/react/devsupport/interfaces/ErrorType;
2020
-
public fun getReactInstanceDevHelper ()Lcom/facebook/react/devsupport/ReactInstanceDevHelper;
2015
+
public final fun getJSAppBundleName ()Ljava/lang/String;
2016
+
public final fun getLastErrorCookie ()I
2017
+
public final fun getLastErrorStack ()[Lcom/facebook/react/devsupport/interfaces/StackFrame;
2018
+
public final fun getLastErrorTitle ()Ljava/lang/String;
2019
+
public final fun getLastErrorType ()Lcom/facebook/react/devsupport/interfaces/ErrorType;
2020
+
public final fun getReactInstanceDevHelper ()Lcom/facebook/react/devsupport/ReactInstanceDevHelper;
2021
2021
public fun getRedBoxHandler ()Lcom/facebook/react/devsupport/interfaces/RedBoxHandler;
2022
2022
public fun getSourceMapUrl ()Ljava/lang/String;
2023
2023
public fun getSourceUrl ()Ljava/lang/String;
2024
2024
protected abstract fun getUniqueTag ()Ljava/lang/String;
2025
2025
public fun handleException (Ljava/lang/Exception;)V
2026
2026
public fun hasUpToDateJSBundleInCache ()Z
2027
-
protected fun hideDevLoadingView ()V
2027
+
protected final fun hideDevLoadingView ()V
2028
2028
public fun hidePausedInDebuggerOverlay ()V
2029
2029
public fun hideRedboxDialog ()V
2030
2030
public fun isPackagerRunning (Lcom/facebook/react/devsupport/interfaces/PackagerStatusCallback;)V
@@ -2036,11 +2036,16 @@ public abstract class com/facebook/react/devsupport/DevSupportManagerBase : com/
2036
2036
public fun reloadJSFromServer (Ljava/lang/String;Lcom/facebook/react/devsupport/interfaces/BundleLoadCallback;)V
2037
2037
public fun reloadSettings ()V
2038
2038
public fun setAdditionalOptionForPackager (Ljava/lang/String;Ljava/lang/String;)V
2039
-
public fun setDevSupportEnabled (Z)V
2039
+
public final fun setDevLoadingViewManager (Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;)V
2040
+
public final fun setDevSupportEnabled (Z)V
2040
2041
public fun setFpsDebugEnabled (Z)V
2041
2042
public fun setHotModuleReplacementEnabled (Z)V
2043
+
public final fun setLastErrorCookie (I)V
2044
+
public final fun setLastErrorStack ([Lcom/facebook/react/devsupport/interfaces/StackFrame;)V
2045
+
public final fun setLastErrorTitle (Ljava/lang/String;)V
2046
+
public final fun setLastErrorType (Lcom/facebook/react/devsupport/interfaces/ErrorType;)V
2042
2047
public fun setPackagerLocationCustomizer (Lcom/facebook/react/devsupport/interfaces/DevSupportManager$PackagerLocationCustomizer;)V
2043
-
protected fun showDevLoadingViewForRemoteJSEnabled ()V
2048
+
protected final fun showDevLoadingViewForRemoteJSEnabled ()V
2044
2049
public fun showDevOptionsDialog ()V
2045
2050
public fun showNewJSError (Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;I)V
2046
2051
public fun showNewJavaError (Ljava/lang/String;Ljava/lang/Throwable;)V
@@ -2055,6 +2060,9 @@ public abstract interface class com/facebook/react/devsupport/DevSupportManagerB
2055
2060
public abstract fun onSuccess (Lcom/facebook/react/bridge/JSBundleLoader;)V
2056
2061
}
2057
2062
2063
+
public final class com/facebook/react/devsupport/DevSupportManagerBase$Companion {
2064
+
}
2065
+
2058
2066
public abstract interface class com/facebook/react/devsupport/DevSupportManagerFactory {
2059
2067
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;
2060
2068
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
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -71,17 +71,18 @@ internal class BridgelessDevSupportManager(
0 commit comments