You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Defer the API 35+ getHistoricalProcessStartReasons binder call off the main thread #5702
AppStartMetrics.registerLifecycleCallbacks performs an ActivityManager.getHistoricalProcessStartReasons(1) binder call synchronously on the main thread on API 35+ (sentry-android-core/src/main/java/io/sentry/android/core/performance/AppStartMetrics.java:467-475). Under auto-init this runs at ContentProvider time via SentryPerformanceProvider.onAppLaunched. #5275 already restricted it to API 35+, but on those devices it still blocks the main thread on a system_server round-trip during the coldest part of startup.
Proposal
The result (appStartType / cachedStartInfo) is only consumed later when app-start spans are assembled — investigate moving the lookup to a background thread/executor with the consumer reading a Future or volatile, or deferring until first frame.
Risks
registerLifecycleCallbacks runs very early (ContentProvider), before the Sentry executor exists — may need a lazy or Handler-based defer rather than options.getExecutorService().
Activity
linear-code commentedon Jul 3, 2026
JAVA-616