From 1af6912989d1272c3ffc3aeeb65d075f0fd44738 Mon Sep 17 00:00:00 2001 From: gallonyin Date: Thu, 13 Jul 2023 18:12:31 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=BB=9A=E5=8A=A8=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/yameida/worktool/utils/AccessibilityUtil.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/yameida/worktool/utils/AccessibilityUtil.kt b/app/src/main/java/org/yameida/worktool/utils/AccessibilityUtil.kt index 138b459..f50424c 100644 --- a/app/src/main/java/org/yameida/worktool/utils/AccessibilityUtil.kt +++ b/app/src/main/java/org/yameida/worktool/utils/AccessibilityUtil.kt @@ -269,6 +269,7 @@ object AccessibilityUtil { var index = 0 while (index++ < maxRetry) { performScrollDown(nodeInfo, 0) + nodeInfo.refresh() val node = findOnceByText(nodeInfo, *textList, exact = exact) if (node != null) { return node @@ -277,6 +278,7 @@ object AccessibilityUtil { index = 0 while (index++ < maxRetry * 2) { performScrollUp(nodeInfo, 0) + nodeInfo.refresh() val node = findOnceByText(nodeInfo, *textList, exact = exact) if (node != null) { return node @@ -289,6 +291,7 @@ object AccessibilityUtil { index = 0 while (index++ < maxRetry * 2) { scrollByXY(service, width / 2, (height / 2.2).toInt(), 0, -height / 3) + nodeInfo.refresh() val node = findOnceByText(nodeInfo, *textList, exact = exact) if (node != null) { return node @@ -297,6 +300,7 @@ object AccessibilityUtil { index = 0 while (index++ < maxRetry * 3) { scrollByXY(service, width / 2, (height / 2.2).toInt(), 0, height / 3) + nodeInfo.refresh() val node = findOnceByText(nodeInfo, *textList, exact = exact) if (node != null) { return node