Skip to content

Commit 5e239d4

Browse files
committed
Fix styling
1 parent 27f2348 commit 5e239d4

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

firebase-sessions/src/main/kotlin/com/google/firebase/sessions/SessionEvents.kt

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import com.google.firebase.encoders.DataEncoder
2222
import com.google.firebase.encoders.FieldDescriptor
2323
import com.google.firebase.encoders.ObjectEncoderContext
2424
import com.google.firebase.encoders.json.JsonDataEncoderBuilder
25-
import java.util.*
25+
import com.google.firebase.sessions.settings.SessionsSettings
2626

2727
/**
2828
* Contains functions for [SessionEvent]s.
@@ -37,8 +37,7 @@ internal object SessionEvents {
3737
.configureWith {
3838
it.registerEncoder(SessionEvent::class.java) {
3939
sessionEvent: SessionEvent,
40-
ctx: ObjectEncoderContext,
41-
->
40+
ctx: ObjectEncoderContext ->
4241
run {
4342
ctx.add(FieldDescriptor.of("event_type"), sessionEvent.eventType)
4443
ctx.add(FieldDescriptor.of("session_data"), sessionEvent.sessionData)
@@ -48,8 +47,7 @@ internal object SessionEvents {
4847

4948
it.registerEncoder(SessionInfo::class.java) {
5049
sessionInfo: SessionInfo,
51-
ctx: ObjectEncoderContext,
52-
->
50+
ctx: ObjectEncoderContext ->
5351
run {
5452
ctx.add(FieldDescriptor.of("session_id"), sessionInfo.sessionId)
5553
ctx.add(FieldDescriptor.of("first_session_id"), sessionInfo.firstSessionId)
@@ -65,8 +63,7 @@ internal object SessionEvents {
6563

6664
it.registerEncoder(DataCollectionStatus::class.java) {
6765
dataCollectionStatus: DataCollectionStatus,
68-
ctx: ObjectEncoderContext,
69-
->
66+
ctx: ObjectEncoderContext ->
7067
run {
7168
ctx.add(FieldDescriptor.of("performance"), dataCollectionStatus.performance)
7269
ctx.add(FieldDescriptor.of("crashlytics"), dataCollectionStatus.crashlytics)
@@ -79,8 +76,7 @@ internal object SessionEvents {
7976

8077
it.registerEncoder(ApplicationInfo::class.java) {
8178
applicationInfo: ApplicationInfo,
82-
ctx: ObjectEncoderContext,
83-
->
79+
ctx: ObjectEncoderContext ->
8480
run {
8581
ctx.add(FieldDescriptor.of("app_id"), applicationInfo.appId)
8682
ctx.add(FieldDescriptor.of("device_model"), applicationInfo.deviceModel)
@@ -92,8 +88,7 @@ internal object SessionEvents {
9288

9389
it.registerEncoder(AndroidApplicationInfo::class.java) {
9490
androidAppInfo: AndroidApplicationInfo,
95-
ctx: ObjectEncoderContext,
96-
->
91+
ctx: ObjectEncoderContext ->
9792
run {
9893
ctx.add(FieldDescriptor.of("package_name"), androidAppInfo.packageName)
9994
ctx.add(FieldDescriptor.of("version_name"), androidAppInfo.versionName)
@@ -110,7 +105,8 @@ internal object SessionEvents {
110105
fun startSession(
111106
firebaseApp: FirebaseApp,
112107
sessionDetails: SessionDetails,
113-
currentTimeUs: Long = WallClock.currentTimeUs(),
108+
sessionsSettings: SessionsSettings,
109+
currentTimeUs: Long = WallClock.currentTimeUs()
114110
) =
115111
SessionEvent(
116112
eventType = EventType.SESSION_START,
@@ -120,6 +116,7 @@ internal object SessionEvents {
120116
sessionDetails.firstSessionId,
121117
sessionDetails.sessionIndex,
122118
currentTimeUs,
119+
DataCollectionStatus(sessionSamplingRate = sessionsSettings.samplingRate),
123120
),
124121
applicationInfo = getApplicationInfo(firebaseApp)
125122
)

0 commit comments

Comments
 (0)