Repository navigation
Commit 4260aa7
authored
fix(android): return from an app open only after the launched app is readable (#2895)
* fix(android): return from an app open only after the launched app is readable
am start -W returns when the activity draws its first frame, which can be a
splash or an empty root while a React Native app still mounts. The first
capture after a cold open --relaunch then saw a content-poor tree and spent
its own budget on re-captures. The open now captures the launched app through
the interactor snapshot path, whose content verdict and bounded re-capture
decide readiness, and reports postOpenObservation. An app that stays
unreadable, or a failed capture, still opens as unobservable.
Refs #1571 (iOS half: #2838).
* fix(android): bound and type the launch observation of an app open
The open's launch capture now runs behind an injected launch observation
port with a fixed 6 s window of its own, separate from the caller's
cancellation. Only a content verdict, a system surface over the app, or
the window running out reads as unobservable. Any other capture failure
is a typed probe-failed result that the open reports and survives.
The capture is transient: it borrows a running helper session and stops
only a session it started, installs no helper, and does not retire the
helper after a content verdict. A URL open reports no observation, and
an app open whose package cannot be read reports app-unidentified.
PostOpenObservation is one documented union in the lifecycle contract,
shared with the Apple owner.
Refs #1571
* fix(android): let the launch settle window end re-captures, never helper work
The open's 6 s window reached the snapshot helper as an abort, so a
window that closed during a cold helper start or a borrowed capture tore
the helper down and left the next read to recover it. The window is now a
settle deadline on the transient capture: the content re-capture loop
starts no attempt after it, while helper start, capture and teardown keep
their own budgets and only the caller's signal cancels them.
The transient read replaces the injected port, the borrow session scope
and the interactor-side install mapping: the capture itself keeps a session
it found, releases one it started, installs no helper and does not retire
it after a content verdict.
Refs #1571
* fix(android): keep a missing-helper refusal out of capture failure recovery
A transient capture on a device without the current helper refused at the
install check, and that refusal went through the capture failure handler,
which logged an error and force-stopped the helper runtime on every new
device's first open. The refusal now reaches the caller directly.
The transient-capture tests move to their own file, so snapshot.test.ts
stays under the test-file size ratchet.
Refs #15711 parent 438b43c commit 4260aa7
18 files changed
Lines changed: 841 additions & 89 deletions
File tree
- packages
- contracts/src
- platform-android/src
- __tests__
- platform-apple/src
- src/core/interactors
- test/integration/provider-scenarios
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
129 | 160 | | |
130 | 161 | | |
131 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
178 | 184 | | |
179 | 185 | | |
180 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
89 | 114 | | |
90 | 115 | | |
91 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
126 | 132 | | |
127 | 133 | | |
128 | 134 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
137 | 145 | | |
138 | 146 | | |
139 | 147 | | |
| |||
513 | 521 | | |
514 | 522 | | |
515 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
0 commit comments