Skip to content

Commit

Permalink
fix: android build error when compiling (#2397)
Browse files Browse the repository at this point in the history
* fix

* update CHANGELOG

* update

* fix detekt
  • Loading branch information
buenaflor authored Nov 8, 2024
1 parent 393dde2 commit 8c69a1b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixes

- Android build error when compiling ([#2397](https://github.com/getsentry/sentry-dart/pull/2397))

## 8.10.0

### Features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class SentryFlutter(
}
data.getIfNotNull<String>("diagnosticLevel") {
if (options.isDebug) {
val sentryLevel = SentryLevel.valueOf(it.uppercase(Locale.ROOT))
val sentryLevel = SentryLevel.valueOf(it.toUpperCase(Locale.ROOT))
options.setDiagnosticLevel(sentryLevel)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import io.sentry.protocol.User
import io.sentry.transport.CurrentDateProvider
import java.io.File
import java.lang.ref.WeakReference
import kotlin.time.DurationUnit
import kotlin.time.toDuration

private const val APP_START_MAX_DURATION_MS = 60000

class SentryFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
private lateinit var channel: MethodChannel
Expand Down Expand Up @@ -174,7 +174,7 @@ class SentryFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
val appStartMetrics = AppStartMetrics.getInstance()

if (!appStartMetrics.isAppLaunchedInForeground ||
appStartMetrics.appStartTimeSpan.durationMs > 1.toDuration(DurationUnit.MINUTES).inWholeMilliseconds
appStartMetrics.appStartTimeSpan.durationMs > APP_START_MAX_DURATION_MS
) {
Log.w(
"Sentry",
Expand Down

0 comments on commit 8c69a1b

Please sign in to comment.