Skip to content

Commit

Permalink
chore(deps): update Android SDK to v7.15.0 (#4161)
Browse files Browse the repository at this point in the history
* chore: update scripts/update-android.sh to 7.15.0

* Adopts the onErrorSampleRate naming (see getsentry/sentry-java#3637)

* Adopts new Mask naming (see getsentry/sentry-java#3741)

* Adds SentryReplayOptions parameter (see getsentry/sentry-java#3749)

---------

Co-authored-by: GitHub <noreply@github.com>
Co-authored-by: Antonis Lilis <antonis.lilis@gmail.com>
  • Loading branch information
3 people authored Oct 10, 2024
1 parent e540498 commit c773341
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
- Bump Cocoa SDK from v8.36.0 to v8.37.0 ([#4156](https://github.com/getsentry/sentry-react-native/pull/4156))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8370)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.36.0...8.37.0)
- Bump Android SDK from v7.14.0 to v7.15.0 ([#4161](https://github.com/getsentry/sentry-react-native/pull/4161))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7150)
- [diff](https://github.com/getsentry/sentry-java/compare/7.14.0...7.15.0)

## 5.33.2

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ android {

dependencies {
implementation 'com.facebook.react:react-native:+'
api 'io.sentry:sentry-android:7.14.0'
api 'io.sentry:sentry-android:7.15.0'
}
10 changes: 5 additions & 5 deletions android/src/main/java/io/sentry/react/RNSentryModuleImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public void initNativeSdk(final ReadableMap rnOptions, Promise promise) {
}

private SentryReplayOptions getReplayOptions(@NotNull ReadableMap rnOptions) {
@NotNull final SentryReplayOptions androidReplayOptions = new SentryReplayOptions();
@NotNull final SentryReplayOptions androidReplayOptions = new SentryReplayOptions(false);

@Nullable final ReadableMap rnExperimentsOptions = rnOptions.getMap("_experiments");
if (rnExperimentsOptions == null) {
Expand All @@ -317,7 +317,7 @@ private SentryReplayOptions getReplayOptions(@NotNull ReadableMap rnOptions) {

androidReplayOptions.setSessionSampleRate(rnExperimentsOptions.hasKey("replaysSessionSampleRate")
? rnExperimentsOptions.getDouble("replaysSessionSampleRate") : null);
androidReplayOptions.setErrorSampleRate(rnExperimentsOptions.hasKey("replaysOnErrorSampleRate")
androidReplayOptions.setOnErrorSampleRate(rnExperimentsOptions.hasKey("replaysOnErrorSampleRate")
? rnExperimentsOptions.getDouble("replaysOnErrorSampleRate") : null);

if (!rnOptions.hasKey("mobileReplayOptions")) {
Expand All @@ -328,12 +328,12 @@ private SentryReplayOptions getReplayOptions(@NotNull ReadableMap rnOptions) {
return androidReplayOptions;
}

androidReplayOptions.setRedactAllText(!rnMobileReplayOptions.hasKey("maskAllText") || rnMobileReplayOptions.getBoolean("maskAllText"));
androidReplayOptions.setRedactAllImages(!rnMobileReplayOptions.hasKey("maskAllImages") || rnMobileReplayOptions.getBoolean("maskAllImages"));
androidReplayOptions.setMaskAllText(!rnMobileReplayOptions.hasKey("maskAllText") || rnMobileReplayOptions.getBoolean("maskAllText"));
androidReplayOptions.setMaskAllImages(!rnMobileReplayOptions.hasKey("maskAllImages") || rnMobileReplayOptions.getBoolean("maskAllImages"));

final boolean redactVectors = !rnMobileReplayOptions.hasKey("maskAllVectors") || rnMobileReplayOptions.getBoolean("maskAllVectors");
if (redactVectors) {
androidReplayOptions.addClassToRedact("com.horcrux.svg.SvgView"); // react-native-svg
androidReplayOptions.addMaskViewClass("com.horcrux.svg.SvgView"); // react-native-svg
}

return androidReplayOptions;
Expand Down

0 comments on commit c773341

Please sign in to comment.