@@ -18,23 +18,23 @@ import com.facebook.react.bridge.ReactSoftExceptionLogger.Categories.SURFACE_MOU
18
18
import java.util.concurrent.CopyOnWriteArrayList
19
19
20
20
@DoNotStrip
21
- public object ReactSoftExceptionLogger {
21
+ internal object ReactSoftExceptionLogger {
22
22
@Retention(AnnotationRetention .SOURCE )
23
23
@StringDef(
24
24
RVG_IS_VIEW_CLIPPED ,
25
25
RVG_ON_VIEW_REMOVED ,
26
26
CLIPPING_PROHIBITED_VIEW ,
27
27
SOFT_ASSERTIONS ,
28
28
SURFACE_MOUNTING_MANAGER_MISSING_VIEWSTATE )
29
- public annotation class CategoryMode
29
+ annotation class CategoryMode
30
30
31
31
/* * 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 =
38
38
" SurfaceMountingManager:MissingViewState"
39
39
}
40
40
@@ -44,29 +44,29 @@ public object ReactSoftExceptionLogger {
44
44
private val listeners: MutableList <ReactSoftExceptionListener > = CopyOnWriteArrayList ()
45
45
46
46
@JvmStatic
47
- public fun addListener (listener : ReactSoftExceptionListener ): Unit {
47
+ fun addListener (listener : ReactSoftExceptionListener ): Unit {
48
48
if (! listeners.contains(listener)) {
49
49
listeners.add(listener)
50
50
}
51
51
}
52
52
53
53
@JvmStatic
54
- public fun removeListener (listener : ReactSoftExceptionListener ): Unit {
54
+ fun removeListener (listener : ReactSoftExceptionListener ): Unit {
55
55
listeners.remove(listener)
56
56
}
57
57
58
58
@JvmStatic
59
- public fun clearListeners (): Unit {
59
+ fun clearListeners (): Unit {
60
60
listeners.clear()
61
61
}
62
62
63
63
@JvmStatic
64
- public fun logSoftExceptionVerbose (@CategoryMode category : String , cause : Throwable ): Unit {
64
+ fun logSoftExceptionVerbose (@CategoryMode category : String , cause : Throwable ): Unit {
65
65
logSoftException(" ${category} |${cause.javaClass.simpleName} :${cause.message} " , cause)
66
66
}
67
67
68
68
@JvmStatic
69
- public fun logSoftException (@CategoryMode category : String , cause : Throwable ): Unit {
69
+ fun logSoftException (@CategoryMode category : String , cause : Throwable ): Unit {
70
70
if (! listeners.isEmpty()) {
71
71
for (listener in listeners) {
72
72
listener.logSoftException(category, cause)
@@ -82,7 +82,7 @@ public object ReactSoftExceptionLogger {
82
82
logSoftException(category, ReactNoCrashSoftException (message))
83
83
}
84
84
85
- public fun interface ReactSoftExceptionListener {
86
- public fun logSoftException (category : String , cause : Throwable )
85
+ fun interface ReactSoftExceptionListener {
86
+ fun logSoftException (category : String , cause : Throwable )
87
87
}
88
88
}
0 commit comments