ACTION_PRESS_AND_HOLD
Action that presses and holds a node.
This action is for nodes that have distinct behavior that depends on how long a press is held. Nodes having a single action for long press should use ACTION_LONG_CLICK instead of this action, and nodes should not expose both actions.
When calling performAction(ACTION_PRESS_AND_HOLD, bundle
, use ACTION_ARGUMENT_PRESS_AND_HOLD_DURATION_MILLIS_INT to specify how long the node is pressed. The first time an accessibility service performs ACTION_PRES_AND_HOLD on a node, it must specify 0 as ACTION_ARGUMENT_PRESS_AND_HOLD, so the application is notified that the held state has started. To ensure reasonable behavior, the values must be increased incrementally and may not exceed 10,000. UIs requested to hold for times outside of this range should ignore the action.
The total time the element is held could be specified by an accessibility user up-front, or may depend on what happens on the UI as the user continues to request the hold.
Note: The time between dispatching the action and it arriving in the UI process is not guaranteed. It is possible on a busy system for the time to expire unexpectedly. For the case of holding down a key for a repeating action, a delayed arrival should be benign. Please do not use this sort of action in cases where such delays will lead to unexpected UI behavior.