mirror of
https://github.com/gkd-kit/gkd.git
synced 2024-11-16 11:42:22 +08:00
fix: getChild array index bound error
This commit is contained in:
parent
0814eb6da0
commit
3bb2375d3b
|
@ -140,10 +140,11 @@ private val getAttr: (AccessibilityNodeInfo, String) -> Any? = { node, name ->
|
|||
}
|
||||
}
|
||||
|
||||
val abTransform = Transform(getAttr = getAttr,
|
||||
val abTransform = Transform(
|
||||
getAttr = getAttr,
|
||||
getName = { node -> node.className },
|
||||
getChildren = getChildren,
|
||||
getChild = { node, index -> node.getChild(index) },
|
||||
getChild = { node, index -> if (index in 0..<node.childCount) node.getChild(index) else null },
|
||||
getParent = { node -> node.parent },
|
||||
getDescendants = { node ->
|
||||
sequence {
|
||||
|
|
Loading…
Reference in New Issue
Block a user