5454import io .sentry .protocol .SentryTransaction ;
5555import io .sentry .protocol .User ;
5656import io .sentry .util .HintUtils ;
57+ import io .sentry .util .Random ;
5758import java .io .File ;
58- import java .security .SecureRandom ;
5959import java .util .ArrayList ;
6060import java .util .Arrays ;
6161import java .util .Collections ;
@@ -83,7 +83,7 @@ public final class AnrV2EventProcessor implements BackfillingEventProcessor {
8383
8484 private final @ NotNull SentryExceptionFactory sentryExceptionFactory ;
8585
86- private final @ Nullable SecureRandom random ;
86+ private final @ Nullable Random random ;
8787
8888 public AnrV2EventProcessor (
8989 final @ NotNull Context context ,
@@ -96,7 +96,7 @@ public AnrV2EventProcessor(
9696 final @ NotNull Context context ,
9797 final @ NotNull SentryAndroidOptions options ,
9898 final @ NotNull BuildInfoProvider buildInfoProvider ,
99- final @ Nullable SecureRandom random ) {
99+ final @ Nullable Random random ) {
100100 this .context = ContextUtils .getApplicationContext (context );
101101 this .options = options ;
102102 this .buildInfoProvider = buildInfoProvider ;
@@ -180,7 +180,7 @@ private boolean sampleReplay(final @NotNull SentryEvent event) {
180180
181181 try {
182182 // we have to sample here with the old sample rate, because it may change between app launches
183- final @ NotNull SecureRandom random = this .random != null ? this .random : new SecureRandom ();
183+ final @ NotNull Random random = this .random != null ? this .random : new Random ();
184184 final double replayErrorSampleRateDouble = Double .parseDouble (replayErrorSampleRate );
185185 if (replayErrorSampleRateDouble < random .nextDouble ()) {
186186 options
0 commit comments