File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
firebase-sessions/src/main/kotlin/com/google/firebase/sessions Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ internal class SessionInitiator(
33
33
private val initiateSessionStart : () -> Unit
34
34
) {
35
35
private var backgroundTime = elapsedRealtime()
36
- private val sessionTimeout = SessionsSettings ().sessionRestartTimeout
37
36
38
37
init {
39
38
initiateSessionStart()
@@ -45,6 +44,7 @@ internal class SessionInitiator(
45
44
46
45
fun appForegrounded () {
47
46
val interval = elapsedRealtime() - backgroundTime
47
+ val sessionTimeout = SessionsSettings ().sessionRestartTimeout
48
48
if (interval > sessionTimeout) {
49
49
initiateSessionStart()
50
50
}
Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ import kotlin.time.Duration.Companion.minutes
26
26
*/
27
27
internal class SessionsSettings {
28
28
// Setting to qualify if sessions service is enabled.
29
- internal val sessionsEnabled: Boolean
29
+ val sessionsEnabled: Boolean
30
30
get() {
31
31
return true
32
32
}
33
33
34
34
// Setting that provides the sessions sampling rate.
35
- internal val samplingRate: Double
35
+ val samplingRate: Double
36
36
get() {
37
37
return 1.0
38
38
}
@@ -42,8 +42,8 @@ internal class SessionsSettings {
42
42
get() = 30 .minutes
43
43
44
44
// Update the settings for all the settings providers
45
- internal fun updateSettings () {
45
+ fun updateSettings () {
46
46
// Placeholder to initiate settings update on different sources
47
47
// Expected sources: RemoteSettings, ManifestOverrides, SDK Defaults
48
48
}
49
- }
49
+
You can’t perform that action at this time.
0 commit comments