@@ -18,23 +18,23 @@ import com.facebook.react.bridge.ReactSoftExceptionLogger.Categories.SURFACE_MOU
1818import java.util.concurrent.CopyOnWriteArrayList
1919
2020@DoNotStrip
21- public object ReactSoftExceptionLogger {
21+ internal object ReactSoftExceptionLogger {
2222 @Retention(AnnotationRetention .SOURCE )
2323 @StringDef(
2424 RVG_IS_VIEW_CLIPPED ,
2525 RVG_ON_VIEW_REMOVED ,
2626 CLIPPING_PROHIBITED_VIEW ,
2727 SOFT_ASSERTIONS ,
2828 SURFACE_MOUNTING_MANAGER_MISSING_VIEWSTATE )
29- public annotation class CategoryMode
29+ annotation class CategoryMode
3030
3131 /* * Constants that listeners can utilize for custom category-based behavior. */
32- public object Categories {
33- public const val RVG_IS_VIEW_CLIPPED : String = " ReactViewGroup.isViewClipped"
34- public const val RVG_ON_VIEW_REMOVED : String = " ReactViewGroup.onViewRemoved"
35- public const val CLIPPING_PROHIBITED_VIEW : String = " ReactClippingProhibitedView"
36- public const val SOFT_ASSERTIONS : String = " SoftAssertions"
37- public const val SURFACE_MOUNTING_MANAGER_MISSING_VIEWSTATE : String =
32+ object Categories {
33+ const val RVG_IS_VIEW_CLIPPED : String = " ReactViewGroup.isViewClipped"
34+ const val RVG_ON_VIEW_REMOVED : String = " ReactViewGroup.onViewRemoved"
35+ const val CLIPPING_PROHIBITED_VIEW : String = " ReactClippingProhibitedView"
36+ const val SOFT_ASSERTIONS : String = " SoftAssertions"
37+ const val SURFACE_MOUNTING_MANAGER_MISSING_VIEWSTATE : String =
3838 " SurfaceMountingManager:MissingViewState"
3939 }
4040
@@ -44,29 +44,29 @@ public object ReactSoftExceptionLogger {
4444 private val listeners: MutableList <ReactSoftExceptionListener > = CopyOnWriteArrayList ()
4545
4646 @JvmStatic
47- public fun addListener (listener : ReactSoftExceptionListener ): Unit {
47+ fun addListener (listener : ReactSoftExceptionListener ): Unit {
4848 if (! listeners.contains(listener)) {
4949 listeners.add(listener)
5050 }
5151 }
5252
5353 @JvmStatic
54- public fun removeListener (listener : ReactSoftExceptionListener ): Unit {
54+ fun removeListener (listener : ReactSoftExceptionListener ): Unit {
5555 listeners.remove(listener)
5656 }
5757
5858 @JvmStatic
59- public fun clearListeners (): Unit {
59+ fun clearListeners (): Unit {
6060 listeners.clear()
6161 }
6262
6363 @JvmStatic
64- public fun logSoftExceptionVerbose (@CategoryMode category : String , cause : Throwable ): Unit {
64+ fun logSoftExceptionVerbose (@CategoryMode category : String , cause : Throwable ): Unit {
6565 logSoftException(" ${category} |${cause.javaClass.simpleName} :${cause.message} " , cause)
6666 }
6767
6868 @JvmStatic
69- public fun logSoftException (@CategoryMode category : String , cause : Throwable ): Unit {
69+ fun logSoftException (@CategoryMode category : String , cause : Throwable ): Unit {
7070 if (! listeners.isEmpty()) {
7171 for (listener in listeners) {
7272 listener.logSoftException(category, cause)
@@ -82,7 +82,7 @@ public object ReactSoftExceptionLogger {
8282 logSoftException(category, ReactNoCrashSoftException (message))
8383 }
8484
85- public fun interface ReactSoftExceptionListener {
86- public fun logSoftException (category : String , cause : Throwable )
85+ fun interface ReactSoftExceptionListener {
86+ fun logSoftException (category : String , cause : Throwable )
8787 }
8888}
0 commit comments