diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index e3f80947a84e29..20faf1ea82a937 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -2182,15 +2182,6 @@ public abstract interface class com/facebook/react/devsupport/ReactInstanceDevHe public abstract fun toggleElementInspector ()V } -public final class com/facebook/react/devsupport/RedBoxContentView : android/widget/LinearLayout, android/widget/AdapterView$OnItemClickListener { - public fun (Landroid/content/Context;Lcom/facebook/react/devsupport/interfaces/DevSupportManager;Lcom/facebook/react/devsupport/interfaces/RedBoxHandler;)V - public final fun init ()V - public fun onItemClick (Landroid/widget/AdapterView;Landroid/view/View;IJ)V - public final fun refreshContentView ()V - public final fun resetReporting ()V - public final fun setExceptionDetails (Ljava/lang/String;[Lcom/facebook/react/devsupport/interfaces/StackFrame;)V -} - public class com/facebook/react/devsupport/ReleaseDevSupportManager : com/facebook/react/devsupport/interfaces/DevSupportManager { public fun ()V public fun addCustomDevOption (Ljava/lang/String;Lcom/facebook/react/devsupport/interfaces/DevOptionHandler;)V diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxContentView.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxContentView.kt index 2d645a4ddd207d..b247666ee7c3c4 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxContentView.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxContentView.kt @@ -45,7 +45,7 @@ import org.json.JSONObject /** Dialog for displaying JS errors in an eye-catching form (red box). */ @SuppressLint("ViewConstructor") -public class RedBoxContentView( +internal class RedBoxContentView( context: Context?, private val devSupportManager: DevSupportManager, private val redBoxHandler: RedBoxHandler?, @@ -190,7 +190,7 @@ public class RedBoxContentView( } } - public fun init() { + fun init() { LayoutInflater.from(context).inflate(R.layout.redbox_view, this) stackView = @@ -220,12 +220,12 @@ public class RedBoxContentView( } } - public fun setExceptionDetails(title: String, stack: Array) { + fun setExceptionDetails(title: String, stack: Array) { stackView.setAdapter(StackAdapter(title, stack)) } /** Show the report button, hide the report textview and the loading indicator. */ - public fun resetReporting() { + fun resetReporting() { if (redBoxHandler?.isReportEnabled() == false) { return } @@ -244,7 +244,7 @@ public class RedBoxContentView( } /** Refresh the content view with latest errors from dev support manager */ - public fun refreshContentView() { + fun refreshContentView() { val message: String? = devSupportManager.lastErrorTitle val stack: Array = devSupportManager.lastErrorStack ?: emptyArray() val errorType: ErrorType = checkNotNull(devSupportManager.lastErrorType)