@@ -77,6 +77,7 @@ public class AppStartTrace implements ActivityLifecycleCallbacks, LifecycleObser
7777
7878 // If the `mainThreadRunnableTime` was set within this duration, the assumption
7979 // is that it was called immediately before `onActivityCreated` in foreground starts on API 34+.
80+ // See b/339891952.
8081 private static final long MAX_BACKGROUND_RUNNABLE_DELAY = TimeUnit .MILLISECONDS .toMicros (50 );
8182
8283 // Core pool size 0 allows threads to shut down if they're idle
@@ -335,7 +336,7 @@ private void recordOnDrawFrontOfQueue() {
335336 * before `onActivityCreated`, the
336337 * assumption is that it was called immediately before the activity lifecycle callbacks in a
337338 * foreground start.
338- * See https://github.com/firebase/firebase-android-sdk/issues/5920 .
339+ * See b/339891952 .
339340 */
340341 private void resolveIsStartedFromBackground () {
341342 // If the mainThreadRunnableTime is null, either the runnable hasn't run, or this check has
@@ -349,7 +350,7 @@ private void resolveIsStartedFromBackground() {
349350 // Otherwise it's assumed to be a background start if the runnable was set more than
350351 // `MAX_BACKGROUND_RUNNABLE_DELAY`
351352 // before the first `onActivityCreated` call.
352- // TODO(b/339891952): Investigate removing the API check, and setting a more precise delay .
353+ // TODO(b/339891952): Investigate removing the API check.
353354 if ((Build .VERSION .SDK_INT < 34 )
354355 || (mainThreadRunnableTime .getDurationMicros () > MAX_BACKGROUND_RUNNABLE_DELAY )) {
355356 isStartedFromBackground = true ;
0 commit comments