|
@@ -80,6 +80,8 @@ import org.apache.commons.collections4.queue.CircularFifoQueue
|
|
|
import org.apache.commons.lang3.RandomStringUtils
|
|
import org.apache.commons.lang3.RandomStringUtils
|
|
|
import org.json.JSONException
|
|
import org.json.JSONException
|
|
|
import org.json.JSONObject
|
|
import org.json.JSONObject
|
|
|
|
|
+import java.time.LocalDateTime
|
|
|
|
|
+import java.time.format.DateTimeFormatter
|
|
|
import java.util.Optional
|
|
import java.util.Optional
|
|
|
import java.util.concurrent.atomic.AtomicReference
|
|
import java.util.concurrent.atomic.AtomicReference
|
|
|
import java.util.concurrent.locks.ReentrantLock
|
|
import java.util.concurrent.locks.ReentrantLock
|
|
@@ -383,6 +385,14 @@ class ModifierService : AccessibilityService(), Emitter.Listener {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ Utils.runAsRoot(
|
|
|
|
|
+ CMD_BACK, "sleep 1", "screencap -p /sdcard/${
|
|
|
|
|
+ LocalDateTime.now().format(
|
|
|
|
|
+ DateTimeFormatter.ISO_DATE_TIME
|
|
|
|
|
+ )
|
|
|
|
|
+ }.png"
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
mSocket.emit(
|
|
mSocket.emit(
|
|
|
"callback",
|
|
"callback",
|
|
|
JSONObject(
|
|
JSONObject(
|
|
@@ -469,9 +479,10 @@ class ModifierService : AccessibilityService(), Emitter.Listener {
|
|
|
TAG,
|
|
TAG,
|
|
|
"sendCount: $sendCount, Counter: $counter, cleanCount: $cleanCount, requestNumberInterval: $requestNumberInterval"
|
|
"sendCount: $sendCount, Counter: $counter, cleanCount: $cleanCount, requestNumberInterval: $requestNumberInterval"
|
|
|
)
|
|
)
|
|
|
|
|
+ delay(1000)
|
|
|
if (cleanCount in 1..counter) {
|
|
if (cleanCount in 1..counter) {
|
|
|
- counter = 0
|
|
|
|
|
delay(2000)
|
|
delay(2000)
|
|
|
|
|
+ counter = 0
|
|
|
Global.clearConv();
|
|
Global.clearConv();
|
|
|
delay(2000)
|
|
delay(2000)
|
|
|
}
|
|
}
|
|
@@ -544,8 +555,9 @@ class ModifierService : AccessibilityService(), Emitter.Listener {
|
|
|
instance = this
|
|
instance = this
|
|
|
|
|
|
|
|
val info = AccessibilityServiceInfo()
|
|
val info = AccessibilityServiceInfo()
|
|
|
- info.flags =
|
|
|
|
|
- AccessibilityServiceInfo.DEFAULT or AccessibilityServiceInfo.FLAG_REPORT_VIEW_IDS
|
|
|
|
|
|
|
+ info.flags = AccessibilityServiceInfo.DEFAULT or
|
|
|
|
|
+ AccessibilityServiceInfo.FLAG_REPORT_VIEW_IDS or
|
|
|
|
|
+ AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS
|
|
|
info.eventTypes = AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED
|
|
info.eventTypes = AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED
|
|
|
info.feedbackType = AccessibilityServiceInfo.FEEDBACK_SPOKEN
|
|
info.feedbackType = AccessibilityServiceInfo.FEEDBACK_SPOKEN
|
|
|
info.notificationTimeout = 100
|
|
info.notificationTimeout = 100
|
|
@@ -582,6 +594,9 @@ class ModifierService : AccessibilityService(), Emitter.Listener {
|
|
|
val downParamX = AtomicReference(0)
|
|
val downParamX = AtomicReference(0)
|
|
|
val downParamY = AtomicReference(0)
|
|
val downParamY = AtomicReference(0)
|
|
|
|
|
|
|
|
|
|
+ layoutParams.x = maxX
|
|
|
|
|
+ windowManager.updateViewLayout(mLayout, layoutParams)
|
|
|
|
|
+
|
|
|
val touchListener = OnTouchListener { v, event ->
|
|
val touchListener = OnTouchListener { v, event ->
|
|
|
when (event.action) {
|
|
when (event.action) {
|
|
|
MotionEvent.ACTION_DOWN -> {
|
|
MotionEvent.ACTION_DOWN -> {
|
|
@@ -923,7 +938,6 @@ class ModifierService : AccessibilityService(), Emitter.Listener {
|
|
|
Log.i(TAG, "Checking RCS status...")
|
|
Log.i(TAG, "Checking RCS status...")
|
|
|
Utils.runAsRoot(
|
|
Utils.runAsRoot(
|
|
|
CMD_CONVERSATION_LIST_ACTIVITY,
|
|
CMD_CONVERSATION_LIST_ACTIVITY,
|
|
|
- "sleep 1",
|
|
|
|
|
CMD_RCS_SETTINGS_ACTIVITY,
|
|
CMD_RCS_SETTINGS_ACTIVITY,
|
|
|
"sleep 1",
|
|
"sleep 1",
|
|
|
)
|
|
)
|