Skip to content

Commit

Permalink
fix: 调整子节点数量限制
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Jan 2, 2024
1 parent bb8fbac commit 8f869c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/kotlin/li/songe/gkd/service/AbExt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ private fun AccessibilityNodeInfo.getTempRect(): Rect {


// https://github.com/gkd-kit/gkd/issues/115
private const val MAX_CHILD_SIZE = 256
// 限制节点遍历的数量避免内存溢出
private const val MAX_CHILD_SIZE = 512
private const val MAX_DESCENDANTS_SIZE = 4096

val getChildren: (AccessibilityNodeInfo) -> Sequence<AccessibilityNodeInfo> = { node ->
Expand Down

0 comments on commit 8f869c6

Please sign in to comment.