@@ -8,6 +8,7 @@ import kotlinx.coroutines.delay
88import kotlinx.serialization.Serializable
99import li.songe.gkd.a11y.A11yRuleEngine
1010import li.songe.gkd.service.A11yService
11+ import li.songe.gkd.service.TrackService
1112import li.songe.gkd.shizuku.casted
1213import li.songe.gkd.shizuku.shizukuContextFlow
1314import li.songe.gkd.util.ScreenUtils
@@ -40,6 +41,7 @@ sealed class ActionPerformer(val action: String) {
4041 node : AccessibilityNodeInfo ,
4142 locationProps : RawSubscription .LocationProps ,
4243 ): ActionResult {
44+ TrackService .addA11yNodePosition(node)
4345 return ActionResult (
4446 action = action,
4547 result = node.performAction(AccessibilityNodeInfo .ACTION_CLICK )
@@ -63,6 +65,7 @@ sealed class ActionPerformer(val action: String) {
6365 position = x to y,
6466 )
6567 }
68+ TrackService .addXyPosition(x, y)
6669 return ActionResult (
6770 action = action,
6871 result = if (shizukuContextFlow.value.tap(x, y)) {
@@ -105,6 +108,7 @@ sealed class ActionPerformer(val action: String) {
105108 node : AccessibilityNodeInfo ,
106109 locationProps : RawSubscription .LocationProps ,
107110 ): ActionResult {
111+ TrackService .addA11yNodePosition(node)
108112 return ActionResult (
109113 action = action,
110114 result = node.performAction(AccessibilityNodeInfo .ACTION_LONG_CLICK ).apply {
@@ -134,6 +138,7 @@ sealed class ActionPerformer(val action: String) {
134138 position = x to y,
135139 )
136140 }
141+ TrackService .addXyPosition(x, y)
137142 return ActionResult (
138143 action = action,
139144 result = if (shizukuContextFlow.value.tap(x, y, LONG_DURATION )) {
@@ -222,6 +227,7 @@ sealed class ActionPerformer(val action: String) {
222227 position = endX to endY,
223228 )
224229 }
230+ TrackService .addSwipePosition(startX, startY, endX, endY, swipeArg.duration)
225231 return if (shizukuContextFlow.value.swipe(
226232 startX,
227233 startY,
0 commit comments