Skip to main content

Module snapshot

Module snapshot 

Source
Expand description

The snapshot payload: the result of a snapshot request.

Class names, package names and resource-id prefixes live once in the snapshot’s string table and nodes refer to them by index; enums are integers and node states a bitmask (design D4). Snapshots, windows, nodes and scroll semantics are maps keyed by field index; bounds, scroll ranges and scroll positions are positional arrays.

Structs§

Bounds
A screen rectangle in pixels, on the wire [left, top, right, bottom].
Node
One accessibility node.
NodeFlags
Node states.
Scroll
Scroll semantics of a node that scrolls: the axis, whether it can scroll back toward the start of its content and forward toward its end from where it is, and, where the platform reports them, the range its content spans and the part of that range inside its viewport, both in the range’s unit.
ScrollAxis
The direction a node scrolls in.
ScrollFlags
Which ways a node can scroll from where it is.
ScrollPosition
The part of a ScrollRange inside the viewport, on the wire [first, last], both inclusive: [0, 15] while the first 16 items of a list are in view.
ScrollRange
The range a scrolling node’s content spans, on the wire [unit, min, max], both ends inclusive: [items, 0, 199] for a list of 200 items.
ScrollUnit
What a ScrollRange counts.
Snapshot
One tree read across the interactive windows.
Truncation
Which request bounds cut a snapshot short.
Window
One window and its node tree.
WindowFlags
Window states.
WindowType
The kind of a window, with Android’s AccessibilityWindowInfo.TYPE_* values.

Constants§

MAX_NODE_DEPTH
How deeply nodes may nest below a window root; agents cap their walk at this depth and decoders reject deeper trees. The decoder keeps its own stack of open nodes on the heap, so a deep tree never exhausts the thread stack.