GestureTool
gesture — dispatch a single-stroke touch gesture via AccessibilityService.dispatchGesture and await the system callback so the call returns only when the gesture completes (or is cancelled).
The stroke is built from an ordered points array (each entry a 2-element [x, y] array of screen pixels; minimum 2 points) traced over duration_ms. Use it for swipes, drags, or tap-by-coordinate when no node matches. Note: this is a single continuous stroke — it cannot express multi-finger gestures such as pinch.
Params: points (required), duration_ms (optional, clamped 10–3000ms, default 300).
On success returns success = true, points (Int count traced), and duration_ms. Errors are long-form messages: malformed/insufficient points, the notConnectedError message when the service is not bound, and a "gesture canceled / could not be dispatched" message on dispatch failure.