Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix app start
  • Loading branch information
buenaflor committed Dec 21, 2023
commit 493f8eba028efae1c89bdf9d791f96c691c3972d
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import io.sentry.SentryEvent
import io.sentry.SentryLevel
import io.sentry.SentryOptions
import io.sentry.android.core.ActivityFramesTracker
import io.sentry.android.core.AppStartState
import io.sentry.android.core.BuildConfig.VERSION_NAME
import io.sentry.android.core.LoadClass
import io.sentry.android.core.SentryAndroid
import io.sentry.android.core.SentryAndroidOptions
import io.sentry.android.core.performance.AppStartMetrics
import io.sentry.protocol.DebugImage
import io.sentry.protocol.SdkVersion
import io.sentry.protocol.SentryId
Expand Down Expand Up @@ -140,8 +140,9 @@ class SentryFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
result.success(null)
return
}
val appStartTime = AppStartState.getInstance().appStartTime
val isColdStart = AppStartState.getInstance().isColdStart

val appStartTime = AppStartMetrics.getInstance().appStartTimeSpan.startTimestamp
val isColdStart = AppStartMetrics.getInstance().appStartType == AppStartMetrics.AppStartType.COLD;

if (appStartTime == null) {
Log.w("Sentry", "App start won't be sent due to missing appStartTime")
Expand Down