From 8f869c6bb6fea31bf2b6d8b25ea743eaa1ed6ff7 Mon Sep 17 00:00:00 2001 From: lisonge Date: Wed, 3 Jan 2024 01:50:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E5=AD=90=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E6=95=B0=E9=87=8F=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/kotlin/li/songe/gkd/service/AbExt.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/li/songe/gkd/service/AbExt.kt b/app/src/main/kotlin/li/songe/gkd/service/AbExt.kt index 30ef509..c26806b 100644 --- a/app/src/main/kotlin/li/songe/gkd/service/AbExt.kt +++ b/app/src/main/kotlin/li/songe/gkd/service/AbExt.kt @@ -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 = { node ->