diff --git a/CHANGELOG.md b/CHANGELOG.md index cc8fa8c69f..8ac127122c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Unreleased + +### Dependencies + +- Bump Android SDK from v6.12.1 to v6.13.0 ([#2790](https://github.com/getsentry/sentry-react-native/pull/2790)) + - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6130) + - [diff](https://github.com/getsentry/sentry-java/compare/6.12.1...6.13.0) + ## 4.14.0 ### Features diff --git a/android/build.gradle b/android/build.gradle index 0066e1b751..abf52e6b8f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -24,5 +24,5 @@ android { dependencies { implementation 'com.facebook.react:react-native:+' - api 'io.sentry:sentry-android:6.12.1' + api 'io.sentry:sentry-android:6.13.0' } diff --git a/android/src/main/java/io/sentry/react/RNSentryModule.java b/android/src/main/java/io/sentry/react/RNSentryModule.java index 7ef0127115..168d857942 100644 --- a/android/src/main/java/io/sentry/react/RNSentryModule.java +++ b/android/src/main/java/io/sentry/react/RNSentryModule.java @@ -32,7 +32,6 @@ import java.io.FileOutputStream; import java.io.InputStream; import java.nio.charset.Charset; -import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -41,10 +40,12 @@ import java.util.concurrent.TimeUnit; import io.sentry.Breadcrumb; +import io.sentry.DateUtils; import io.sentry.HubAdapter; import io.sentry.ILogger; import io.sentry.Integration; import io.sentry.Sentry; +import io.sentry.SentryDate; import io.sentry.SentryEvent; import io.sentry.SentryLevel; import io.sentry.UncaughtExceptionHandlerIntegration; @@ -234,7 +235,7 @@ public void fetchNativeRelease(Promise promise) { @ReactMethod public void fetchNativeAppStart(Promise promise) { final AppStartState appStartInstance = AppStartState.getInstance(); - final Date appStartTime = appStartInstance.getAppStartTime(); + final SentryDate appStartTime = appStartInstance.getAppStartTime(); final Boolean isColdStart = appStartInstance.isColdStart(); if (appStartTime == null) { @@ -244,11 +245,11 @@ public void fetchNativeAppStart(Promise promise) { logger.log(SentryLevel.WARNING, "App start won't be sent due to missing isColdStart."); promise.resolve(null); } else { - final double appStartTimestamp = (double) appStartTime.getTime(); + final double appStartTimestampMs = DateUtils.nanosToMillis(appStartTime.nanoTimestamp()); WritableMap appStart = Arguments.createMap(); - appStart.putDouble("appStartTime", appStartTimestamp); + appStart.putDouble("appStartTime", appStartTimestampMs); appStart.putBoolean("isColdStart", isColdStart); appStart.putBoolean("didFetchAppStart", didFetchAppStart);