ref(android): Mark AppStartMetrics.setAppStartType as @TestOnly - #6121
Merged
Merged
Conversation
📲 Install BuildsAndroid
|
No production code calls this setter; the cold/warm classification assigns the field directly. Its only callers are tests, so annotate it the way the neighboring test seams (setFirstIdle, getFirstIdle, clear) already are. It has to stay public: most of those call sites live in io.sentry.android.core, a different package from AppStartMetrics. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
runningcode
force-pushed
the
no/app-start-type-setter-test-only
branch
from
September 16, 2026 09:05
e1852cc to
10a659a
Compare
runningcode
marked this pull request as ready for review
September 16, 2026 09:17
runningcode
requested review from
0xadam-brown,
adinauer,
markushi and
romtsn
as code owners
September 16, 2026 09:17
0xadam-brown
approved these changes
Sep 16, 2026
0xadam-brown
left a comment
Member
There was a problem hiding this comment.
(For my own reference, AppStartMetrics is already @ApiStatus.Internal)
🚀
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Annotates
AppStartMetrics.setAppStartTypewith@TestOnly.💡 Motivation and Context
Nothing in the SDK calls this setter — the cold/warm classification assigns the field directly. Its only callers are tests, so it now matches the neighboring test seams
setFirstIdle,getFirstIdleandclear.It has to stay
public: most of those call sites are inio.sentry.android.core, a different package fromAppStartMetrics.💚 How did you test it?
Annotation only — no behavior change.
📝 Checklist
sendDefaultPIIis enabled.#skip-changelog
🤖 Generated with Claude Code