fromWithVisitedSet

fun fromWithVisitedSet(node: AccessibilityNodeInfoCompat?, depth: Int, index: Int, window: AbraWindow?, parent: AbraElement?, visited: MutableSet<AccessibilityNodeInfoCompat> = mutableSetOf()): AbraElement?

Helper method to create an AbraElement from a nullable AccessibilityNodeInfoCompat. Uses cache to prevent duplicate objects and stop infinite recursion.

Return

An AbraElement or null.

Parameters

node

A nullable AccessibilityNodeInfoCompat instance

depth

The depth within the tree Int

index

The index within the tree Int

window

A nullable AbraWindow instance

visited

A list of visited AccessibilityNodeInfoCompat instances