|
|
@@ -17,7 +17,9 @@ import com.example.modifier.utils.currentActivity
|
|
|
import com.example.modifier.utils.findAllScrollable
|
|
|
import com.example.modifier.utils.findFirstByIdAndText
|
|
|
import com.example.modifier.utils.shellRun
|
|
|
+import kotlinx.coroutines.Dispatchers
|
|
|
import kotlinx.coroutines.delay
|
|
|
+import kotlinx.coroutines.withContext
|
|
|
import kotlinx.coroutines.withTimeoutOrNull
|
|
|
|
|
|
class ScreenController(val context: AccessibilityService, private val inspector: ScreenInspector) {
|
|
|
@@ -35,7 +37,7 @@ class ScreenController(val context: AccessibilityService, private val inspector:
|
|
|
res.rcsSwitch = null
|
|
|
inspector.traverseNode(res)
|
|
|
if (res.rcsSwitch == null) {
|
|
|
- shellRun(CMD_BACK, "sleep 0.5", CMD_RCS_SETTINGS_ACTIVITY, "sleep 1")
|
|
|
+ shellRun(CMD_BACK, "sleep 0.5", CMD_RCS_SETTINGS_ACTIVITY, "sleep 2")
|
|
|
} else {
|
|
|
if (res.rcsSwitch!!.isChecked == state) {
|
|
|
return@repeatBlock true
|