Commit c872d8e
committed
firebase-perf: TODO pointing at causal-signal alternatives for app-start detection
The timing-window heuristic in resolveIsStartedFromBackground() infers "was this
process forked to launch an Activity?" from the ordering of a posted runnable
vs the first onActivityCreated callback. That ordering already shifted once on
API 34+ (caused the original bug fixed in PR #7281, and the threshold-too-tight
follow-up in #8103) and could shift again on future OS versions.
Add a TODO documenting two cleaner alternatives so the next maintainer doesn't
have to re-derive them:
- API 35+: ApplicationStartInfo / getHistoricalProcessStartReasons gives the
OS's authoritative start reason (LAUNCHER, SERVICE, CONTENT_PROVIDER, ...).
Removes the heuristic entirely on supported devices.
- API 34: RunningAppProcessInfo.importanceReasonCode + .importance captured
early in FirebasePerfEarly (before our own ContentProvider work mutates the
cause), combined with the timing window as a fallback.
Comment-only change; no behavior or test surface affected.1 parent b8f20ea commit c872d8e
1 file changed
Lines changed: 19 additions & 1 deletion
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
351 | 369 | | |
352 | 370 | | |
353 | 371 | | |
| |||
0 commit comments