fix(android): skip the tap-escape guard when the launcher owned the focus before
Summary
The Android escape check failed a deliberate touch made while the session app was already in the background. After home, a longpress on a launcher icon opened the shortcut menu but returned COMMAND_FAILED … The tap likely escaped the app, so agents retried a gesture that had already worked.
The check is now skipped only when an escape surface (the launcher, Settings, System UI) owned the focus before the dispatch. The focus comes from the blocking-dialog readiness read that already runs before each touch, so there's no extra device call. A permission prompt, custom tab or sign-in activity in the app's flow, or a read that names no package, keeps the check. Messages now name the actual command.
Before / after
Pixel 9 AVD (Android 16): open <app>, home, snapshot -i, then a long-press on the app's launcher icon:
$ longpress @e12
base a4f2dcad0: COMMAND_FAILED: press @e12 left <app> and foregrounded com.google.android.apps.nexuslauncher. The tap likely escaped the app.
head 5aa044cce: Long pressed @e12 (907, 1986)
# on both, the next snapshot -i shows the shortcut menu (App info, Widgets)
Validation
- Head
5aa044cce,check:affected --run --head,exactCommit: true. Format, lint, typecheck, layering, fallow, build and vitest-related pass.unitfails only onupload-http-deadlineandcommitted-source-tree, which fail the same way on clean main on this macOS host.test:integration:providerpasses when run directly (317/317). - The new daemon and observation tests fail at base, or against a skip on any other focused package.
- A touch that really leaves the app, where the app owned the focus before, is still an error. That case is covered by tests only.

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.