Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoXiCheng committed Sep 25, 2024
1 parent 360533b commit dfcd409
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.cancel
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import java.io.File
import javax.inject.Inject

Expand Down Expand Up @@ -99,7 +100,9 @@ class MyAccessibilityService : AccessibilityService() {
targetRect?.let { rect ->
val rectStr = rect.toString()
if (!clickedRect.contains(rectStr)) {
click(that, rect)
withContext(Dispatchers.Main) {
click(that, rect)
}
clickedRect.add(rectStr)
LogUtils.d("clicked: packageName is $rootNodePackageName rect is $rectStr")
}
Expand All @@ -120,7 +123,7 @@ class MyAccessibilityService : AccessibilityService() {

scanTimes++
} catch (e: Exception) {
// LogUtils.e(e)
LogUtils.e(e)
}
}

Expand Down

0 comments on commit dfcd409

Please sign in to comment.