fix(android): dispatch helper taps and keys without the global animation wait

TH
5h ago
+699-74

Summary

Android press x y and helper keys took up to 10 s while a window animation was pending: the public UiAutomation.injectInputEvent(event, sync) waits for animations before DOWN and after UP, up to 5 s each. Taps and keys now skip that wait, like touch plans (#1356).

  • PressSequence: every refused start is released (touch ACTION_CANCEL, key canceled ACTION_UP), then retried once after the framework's animation sync, only if the host deadline has room.
  • Host: input waits 45 s or until the request deadline; helper gets budgetMs, the wait less a 5 s margin. Under 2 s left (one attempt), the press is refused unsent (android-input-budget-exhausted).
  • Shared TouchEvents builder; API < 34 unchanged.

11 files. Refs #4590.

Validation

Head 218e157c4f, main a30accf380, emulator-5556 API 35, helper 0.21.39-dev, installed SHA-256 verified per block. ABAB, 15 per arm, 0 failures, 0 inconsistent-input logs, load 11-35:

routemain p50/p95head p50/p95
press after transition10.47/10.72 s5.93/6.83 s
press during RN Modal slide-in4.11/4.28 s0.40/0.56 s
idle press0.30/0.40 s0.32/0.43 s
helper back key0.93/2.02 s0.38/0.50 s

Mid-slide, head taps the in-flight sheet; main waits, then hits the button. Forced retry: refused DOWN, retry landed, no inconsistent logcat; live fill entered text.

CI owns check:affected: green. Risk: a hung app can block one end 30 s.

🤖 Generated with Claude Code