Skip to content

Commit 18a204e

Browse files
Merge branch 'main' into 5.0.0
2 parents 7f3249b + f16d330 commit 18a204e

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
- Bump Cocoa SDK from v7.31.5 to v8.0.0 ([#2756](https://github.com/getsentry/sentry-react-native/pull/2756))
2222
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#800)
2323
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.31.5...8.0.0)
24+
- Bump Android SDK from v6.12.1 to v6.13.0 ([#2790](https://github.com/getsentry/sentry-react-native/pull/2790))
25+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6130)
26+
- [diff](https://github.com/getsentry/sentry-java/compare/6.12.1...6.13.0)
2427

2528
## 4.14.0
2629

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ android {
4242

4343
dependencies {
4444
implementation 'com.facebook.react:react-native:+'
45-
api 'io.sentry:sentry-android:6.12.1'
45+
api 'io.sentry:sentry-android:6.13.0'
4646
}

android/src/main/java/io/sentry/react/RNSentryModuleImpl.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import java.io.FileOutputStream;
3232
import java.io.InputStream;
3333
import java.nio.charset.Charset;
34-
import java.util.Date;
3534
import java.util.HashMap;
3635
import java.util.List;
3736
import java.util.Map;
@@ -40,10 +39,12 @@
4039
import java.util.concurrent.TimeUnit;
4140

4241
import io.sentry.Breadcrumb;
42+
import io.sentry.DateUtils;
4343
import io.sentry.HubAdapter;
4444
import io.sentry.ILogger;
4545
import io.sentry.Integration;
4646
import io.sentry.Sentry;
47+
import io.sentry.SentryDate;
4748
import io.sentry.SentryEvent;
4849
import io.sentry.SentryLevel;
4950
import io.sentry.UncaughtExceptionHandlerIntegration;
@@ -231,7 +232,7 @@ public void fetchNativeRelease(Promise promise) {
231232

232233
public void fetchNativeAppStart(Promise promise) {
233234
final AppStartState appStartInstance = AppStartState.getInstance();
234-
final Date appStartTime = appStartInstance.getAppStartTime();
235+
final SentryDate appStartTime = appStartInstance.getAppStartTime();
235236
final Boolean isColdStart = appStartInstance.isColdStart();
236237

237238
if (appStartTime == null) {
@@ -241,11 +242,11 @@ public void fetchNativeAppStart(Promise promise) {
241242
logger.log(SentryLevel.WARNING, "App start won't be sent due to missing isColdStart.");
242243
promise.resolve(null);
243244
} else {
244-
final double appStartTimestamp = (double) appStartTime.getTime();
245+
final double appStartTimestampMs = DateUtils.nanosToMillis(appStartTime.nanoTimestamp());
245246

246247
WritableMap appStart = Arguments.createMap();
247248

248-
appStart.putDouble("appStartTime", appStartTimestamp);
249+
appStart.putDouble("appStartTime", appStartTimestampMs);
249250
appStart.putBoolean("isColdStart", isColdStart);
250251
appStart.putBoolean("didFetchAppStart", didFetchAppStart);
251252

0 commit comments

Comments
 (0)