|
36 | 36 | import io.sentry.ISentryExecutorService; |
37 | 37 | import io.sentry.ISerializer; |
38 | 38 | import io.sentry.Integration; |
| 39 | +import io.sentry.ProfileLifecycle; |
39 | 40 | import io.sentry.ScopesAdapter; |
40 | 41 | import io.sentry.ScreenshotStrategyType; |
41 | 42 | import io.sentry.Sentry; |
@@ -483,8 +484,7 @@ private SentryReplayQuality parseReplayQuality(@Nullable String qualityString) { |
483 | 484 | } |
484 | 485 | } |
485 | 486 |
|
486 | | - private void configureAndroidProfiling( |
487 | | - @NotNull SentryAndroidOptions options, @NotNull ReadableMap rnOptions) { |
| 487 | + private void configureAndroidProfiling(@NotNull SentryAndroidOptions options, @NotNull ReadableMap rnOptions) { |
488 | 488 | if (!rnOptions.hasKey("_experiments")) { |
489 | 489 | return; |
490 | 490 | } |
@@ -516,24 +516,21 @@ private void configureAndroidProfiling( |
516 | 516 | if (androidProfilingOptions.hasKey("lifecycle")) { |
517 | 517 | final String lifecycle = androidProfilingOptions.getString("lifecycle"); |
518 | 518 | if ("manual".equalsIgnoreCase(lifecycle)) { |
519 | | - options.setProfilingLifecycle( |
520 | | - io.sentry.android.core.SentryAndroidOptions.ProfilingLifecycle.MANUAL); |
521 | | - logger.log(SentryLevel.INFO, "Android UI Profiling lifecycle set to: MANUAL"); |
| 519 | + options.setProfileLifecycle(ProfileLifecycle.MANUAL); |
| 520 | + logger.log(SentryLevel.INFO, "Android UI Profile Lifecycle set to MANUAL"); |
522 | 521 | } else if ("trace".equalsIgnoreCase(lifecycle)) { |
523 | | - options.setProfilingLifecycle( |
524 | | - io.sentry.android.core.SentryAndroidOptions.ProfilingLifecycle.TRACE); |
525 | | - logger.log(SentryLevel.INFO, "Android UI Profiling lifecycle set to: TRACE"); |
| 522 | + options.setProfileLifecycle(ProfileLifecycle.TRACE); |
| 523 | + logger.log(SentryLevel.INFO, "Android UI Profile Lifecycle set to TRACE"); |
526 | 524 | } |
527 | 525 | } |
528 | 526 |
|
529 | 527 | // Set start on app start |
530 | 528 | if (androidProfilingOptions.hasKey("startOnAppStart")) { |
531 | 529 | final boolean startOnAppStart = androidProfilingOptions.getBoolean("startOnAppStart"); |
532 | | - options.setStartProfilingOnAppStart(startOnAppStart); |
| 530 | + options.setStartProfilerOnAppStart(startOnAppStart); |
533 | 531 | logger.log( |
534 | 532 | SentryLevel.INFO, |
535 | | - String.format( |
536 | | - "Android UI Profiling startOnAppStart set to: %b", startOnAppStart)); |
| 533 | + String.format("Android UI Profiling startOnAppStart set to %b", startOnAppStart)); |
537 | 534 | } |
538 | 535 | } |
539 | 536 |
|
|
0 commit comments