Skip to content

Commit e1852cc

Browse files
runningcodeclaude
andcommitted
ref(android): Mark AppStartMetrics.setAppStartType as @testonly
No production code calls this setter; the cold/warm classification assigns the field directly. Its only callers are the 45 test sites that seed a start type, so annotate it the way the neighboring test seams (setFirstIdle, getFirstIdle, clear) already are. It has to stay public: 37 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>
1 parent 033ce52 commit e1852cc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎sentry-android-core/src/main/java/io/sentry/android/core/performance/AppStartMetrics.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ public AppStartMetrics() {
156156
return applicationOnCreate;
157157
}
158158

159+
/**
160+
* Seeds the start type directly, bypassing the cold/warm classification. Production code assigns
161+
* {@link #appStartType} as part of that classification instead.
162+
*/
163+
@TestOnly
159164
public void setAppStartType(final @NotNull AppStartType appStartType) {
160165
this.appStartType = appStartType;
161166
}

0 commit comments

Comments
 (0)