Skip to content

Commit 5199b74

Browse files
Update src/Sentry/Platforms/Android/SentrySdk.cs
Co-authored-by: James Crosswell <[email protected]>
1 parent 8f2c6ae commit 5199b74

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Sentry/Platforms/Android/SentrySdk.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,14 @@ private static void InitSentryAndroidSdk(SentryOptions options)
100100
}
101101
}
102102

103-
if (options.Android.SuppressSegfaults || options.Native.EnableBeforeSend || options.BeforeSendInternal != null)
103+
if (options.Android.SuppressSegfaults)
104104
{
105105
o.BeforeSend = new BeforeSendCallback(BeforeSendWrapper(options), options, o);
106106
}
107+
else if (options.Native.EnableBeforeSend && options.BeforeSendInternal is { } beforeSend)
108+
{
109+
o.BeforeSend = beforeSend;
110+
}
107111

108112
// These options are from SentryAndroidOptions
109113
o.AttachScreenshot = options.Native.AttachScreenshot;

0 commit comments

Comments
 (0)