fix(android): Improve app start type detection with main thread timing by markushi · Pull Request #4999 · getsentry/sentry-java
added 2 commits
December 29, 2025 10:14
markushi
marked this pull request as ready for review
- Add support for ApplicationStartInfo API on Android 15+ (API 35) for more accurate cold/warm start detection - Add null safety check for ActivityManager service - Fix detection logic to prevent legacy methods from running when API 35+ already determined start type - Set app start type to WARM when app moves to background (process stays alive) - Add comprehensive test coverage with notification-triggered start scenarios Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add custom SentryShadowActivityManager to mock ApplicationStartInfo for testing cold/warm start detection on Android 15 (API 35). Tests verify the new getHistoricalProcessStartReasons() code path and fallback behavior when the list is empty or invalid. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
markushi
deleted the
fix/app-start-warm-detection
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters