From d0d8cf45904efcd92cabdbfe6a65fff989b7a14e Mon Sep 17 00:00:00 2001 From: GitHub Date: Thu, 21 Dec 2023 14:36:59 +0000 Subject: [PATCH 1/3] chore: update flutter/scripts/update-android.sh to 7.1.0 --- CHANGELOG.md | 6 ++++++ flutter/android/build.gradle | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9051b9e07..cd48a1a64a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ - We only get the info if online/offline on web platform. The added breadcrumb is set to either `wifi` or `none`. - APM for isar ([#1726](https://github.com/getsentry/sentry-dart/pull/1726)) +### Dependencies + +- Bump Android SDK from v7.0.0 to v7.1.0 ([#1788](https://github.com/getsentry/sentry-dart/pull/1788)) + - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#710) + - [diff](https://github.com/getsentry/sentry-java/compare/7.0.0...7.1.0) + ## 7.14.0 - Add option to opt out of fatal level for automatically collected errors ([#1738](https://github.com/getsentry/sentry-dart/pull/1738)) diff --git a/flutter/android/build.gradle b/flutter/android/build.gradle index 859103b80f..e594b017ea 100644 --- a/flutter/android/build.gradle +++ b/flutter/android/build.gradle @@ -60,7 +60,7 @@ android { } dependencies { - api 'io.sentry:sentry-android:7.0.0' + api 'io.sentry:sentry-android:7.1.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" // Required -- JUnit 4 framework From 493f8eba028efae1c89bdf9d791f96c691c3972d Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Thu, 21 Dec 2023 16:07:11 +0100 Subject: [PATCH 2/3] Fix app start --- .../main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt b/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt index 2ae6a673cb..af43b93f4e 100644 --- a/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt +++ b/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt @@ -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 @@ -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") From de8967b573b0aadb4a37ba9879601882bd422e70 Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Thu, 21 Dec 2023 16:10:22 +0100 Subject: [PATCH 3/3] format --- .../src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt b/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt index af43b93f4e..b908ff823f 100644 --- a/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt +++ b/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt @@ -142,7 +142,7 @@ class SentryFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAware { } val appStartTime = AppStartMetrics.getInstance().appStartTimeSpan.startTimestamp - val isColdStart = AppStartMetrics.getInstance().appStartType == AppStartMetrics.AppStartType.COLD; + val isColdStart = AppStartMetrics.getInstance().appStartType == AppStartMetrics.AppStartType.COLD if (appStartTime == null) { Log.w("Sentry", "App start won't be sent due to missing appStartTime")