File tree Expand file tree Collapse file tree 4 files changed +13
-11
lines changed
src/main/kotlin/com/google/firebase/sessions/api Expand file tree Collapse file tree 4 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ android {
60
60
}
61
61
}
62
62
63
+ kotlin { explicitApi() }
64
+
63
65
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KaptGenerateStubs ::class .java).configureEach {
64
66
kotlinOptions.jvmTarget = " 1.8"
65
67
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import com.google.firebase.sessions.SharedSessionRepository
25
25
* This object provides a static-like entry point that Crashlytics calls to inform Sessions a fatal
26
26
* crash has occurred.
27
27
*/
28
- object CrashEventReceiver {
28
+ public object CrashEventReceiver {
29
29
@VisibleForTesting internal lateinit var sharedSessionRepository: SharedSessionRepository
30
30
31
31
/* *
@@ -38,7 +38,7 @@ object CrashEventReceiver {
38
38
* @see SharedSessionRepository.appBackground
39
39
*/
40
40
@JvmStatic
41
- fun notifyCrashOccurred () {
41
+ public fun notifyCrashOccurred () {
42
42
try {
43
43
if (! ::sharedSessionRepository.isInitialized) {
44
44
sharedSessionRepository = SharedSessionRepository .instance
Original file line number Diff line number Diff line change @@ -30,15 +30,15 @@ import kotlinx.coroutines.sync.withLock
30
30
*
31
31
* This is important because the Sessions SDK starts up before dependent SDKs.
32
32
*/
33
- object FirebaseSessionsDependencies {
33
+ public object FirebaseSessionsDependencies {
34
34
private val dependencies = synchronizedMap(mutableMapOf<SessionSubscriber .Name , Dependency >())
35
35
36
36
/* *
37
37
* Add a subscriber as a dependency to the Sessions SDK. Every dependency must register itself, or
38
38
* the Sessions SDK will never generate a session.
39
39
*/
40
40
@JvmStatic
41
- fun addDependency (subscriberName : SessionSubscriber .Name ) {
41
+ public fun addDependency (subscriberName : SessionSubscriber .Name ) {
42
42
if (dependencies.containsKey(subscriberName)) {
43
43
Log .d(TAG , " Dependency $subscriberName already added." )
44
44
return
@@ -54,7 +54,7 @@ object FirebaseSessionsDependencies {
54
54
* return.
55
55
*/
56
56
@JvmStatic
57
- fun register (subscriber : SessionSubscriber ) {
57
+ public fun register (subscriber : SessionSubscriber ) {
58
58
val subscriberName = subscriber.sessionSubscriberName
59
59
val dependency = getDependency(subscriberName)
60
60
Original file line number Diff line number Diff line change @@ -19,20 +19,20 @@ package com.google.firebase.sessions.api
19
19
import androidx.annotation.Discouraged
20
20
21
21
/* * [SessionSubscriber] is an interface that dependent SDKs must implement. */
22
- interface SessionSubscriber {
22
+ public interface SessionSubscriber {
23
23
/* * [SessionSubscriber.Name]s are used for identifying subscribers. */
24
- enum class Name {
24
+ public enum class Name {
25
25
CRASHLYTICS ,
26
26
PERFORMANCE ,
27
27
@Discouraged(message = " This is for testing purposes only." ) MATT_SAYS_HI ,
28
28
}
29
29
30
30
/* * [SessionDetails] contains session data passed to subscribers whenever the session changes */
31
- data class SessionDetails (val sessionId : String )
31
+ public data class SessionDetails (val sessionId : String )
32
32
33
- fun onSessionChanged (sessionDetails : SessionDetails )
33
+ public fun onSessionChanged (sessionDetails : SessionDetails )
34
34
35
- val isDataCollectionEnabled: Boolean
35
+ public val isDataCollectionEnabled: Boolean
36
36
37
- val sessionSubscriberName: Name
37
+ public val sessionSubscriberName: Name
38
38
}
You can’t perform that action at this time.
0 commit comments