File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
main/java/io/sentry/android/core
test/java/io/sentry/android/core Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ public final class SentryAndroidOptions extends SentryOptions {
164164 * Enable the Java to NDK Scope sync. The default value for sentry-java is disabled and enabled
165165 * for sentry-android.
166166 */
167- private boolean enableScopeSync ;
167+ private boolean enableScopeSync = true ;
168168
169169 public interface BeforeCaptureCallback {
170170
@@ -195,9 +195,6 @@ public SentryAndroidOptions() {
195195 setSentryClientName (BuildConfig .SENTRY_ANDROID_SDK_NAME + "/" + BuildConfig .VERSION_NAME );
196196 setSdkVersion (createSdkVersion ());
197197 setAttachServerName (false );
198-
199- // enable scope sync for Android by default
200- setEnableScopeSync (true );
201198 }
202199
203200 private @ NotNull SdkVersion createSdkVersion () {
Original file line number Diff line number Diff line change @@ -134,8 +134,16 @@ class SentryAndroidOptionsTest {
134134 }
135135
136136 @Test
137- fun `when options is initialized, enableScopeSync is false` () {
138- assertFalse(SentryAndroidOptions ().isEnableScopeSync)
137+ fun `when options is initialized, enableScopeSync is enabled by default` () {
138+ assertTrue(SentryAndroidOptions ().isEnableScopeSync)
139+ }
140+
141+ @Test
142+ fun `enableScopeSync can be properly disabled` () {
143+ val options = SentryAndroidOptions ()
144+ options.isEnableScopeSync = false
145+
146+ assertFalse(options.isEnableScopeSync)
139147 }
140148
141149 private class CustomDebugImagesLoader : IDebugImagesLoader {
You can’t perform that action at this time.
0 commit comments