update 未选择接收者中止;时间心跳优化
This commit is contained in:
@@ -695,7 +695,7 @@ object WeworkOperationImpl {
|
|||||||
if (shareToWorkButton == null) {
|
if (shareToWorkButton == null) {
|
||||||
LogUtils.e("未找到发送给同事: $objectName")
|
LogUtils.e("未找到发送给同事: $objectName")
|
||||||
if (retryCount > 0) {
|
if (retryCount > 0) {
|
||||||
return pushMicroDiskImage(message, titleList, objectName, extraText, retryCount - 1)
|
return pushFile(message, titleList, objectName, fileUrl, fileBase64, fileType, extraText, retryCount - 1)
|
||||||
}
|
}
|
||||||
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "未找到发送给同事: $objectName", startTime, listOf(), titleList)
|
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "未找到发送给同事: $objectName", startTime, listOf(), titleList)
|
||||||
return false
|
return false
|
||||||
@@ -763,7 +763,7 @@ object WeworkOperationImpl {
|
|||||||
if (shareToWorkButton == null) {
|
if (shareToWorkButton == null) {
|
||||||
LogUtils.e("未找到发送给同事: $objectName")
|
LogUtils.e("未找到发送给同事: $objectName")
|
||||||
if (retryCount > 0) {
|
if (retryCount > 0) {
|
||||||
return pushMicroDiskImage(message, titleList, objectName, extraText, retryCount - 1)
|
return pushFile(message, titleList, objectName, fileUrl, fileBase64, fileType, extraText, retryCount - 1)
|
||||||
}
|
}
|
||||||
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "未找到发送给同事: $objectName", startTime, listOf(), titleList)
|
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "未找到发送给同事: $objectName", startTime, listOf(), titleList)
|
||||||
return false
|
return false
|
||||||
@@ -1823,6 +1823,7 @@ object WeworkOperationImpl {
|
|||||||
val multiButton: AccessibilityNodeInfo = textViewList[textViewList.size - 1]
|
val multiButton: AccessibilityNodeInfo = textViewList[textViewList.size - 1]
|
||||||
AccessibilityUtil.performClick(multiButton)
|
AccessibilityUtil.performClick(multiButton)
|
||||||
AccessibilityUtil.performClick(searchButton)
|
AccessibilityUtil.performClick(searchButton)
|
||||||
|
var isSelect = false
|
||||||
for (select in selectList) {
|
for (select in selectList) {
|
||||||
val needTrim = select.contains(Constant.regTrimTitle)
|
val needTrim = select.contains(Constant.regTrimTitle)
|
||||||
val trimTitle = select.replace(Constant.regTrimTitle, "")
|
val trimTitle = select.replace(Constant.regTrimTitle, "")
|
||||||
@@ -1850,6 +1851,7 @@ object WeworkOperationImpl {
|
|||||||
val imageView =
|
val imageView =
|
||||||
AccessibilityUtil.findOneByClazz(item, Views.ImageView, root = false)
|
AccessibilityUtil.findOneByClazz(item, Views.ImageView, root = false)
|
||||||
AccessibilityUtil.performClick(imageView)
|
AccessibilityUtil.performClick(imageView)
|
||||||
|
isSelect = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1862,6 +1864,11 @@ object WeworkOperationImpl {
|
|||||||
}
|
}
|
||||||
sleep(Constant.POP_WINDOW_INTERVAL)
|
sleep(Constant.POP_WINDOW_INTERVAL)
|
||||||
}
|
}
|
||||||
|
if (!isSelect) {
|
||||||
|
LogUtils.e("未选择接收者")
|
||||||
|
error("未选择接收者")
|
||||||
|
return false
|
||||||
|
}
|
||||||
val confirmButton =
|
val confirmButton =
|
||||||
AccessibilityUtil.findOneByTextRegex(getRoot(), "^确定(\\(.*?\\))?\$")
|
AccessibilityUtil.findOneByTextRegex(getRoot(), "^确定(\\(.*?\\))?\$")
|
||||||
if (confirmButton != null) {
|
if (confirmButton != null) {
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ public class WebSocketManager {
|
|||||||
WebSocket s = new OkHttpClient().newWebSocket(new Request.Builder().url(url).build(), listener);
|
WebSocket s = new OkHttpClient().newWebSocket(new Request.Builder().url(url).build(), listener);
|
||||||
if (s.send(WebSocketManager.HEARTBEAT)) {
|
if (s.send(WebSocketManager.HEARTBEAT)) {
|
||||||
this.socket = s;
|
this.socket = s;
|
||||||
|
s.send("{\"td\":" + System.currentTimeMillis() + "}");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -157,6 +158,8 @@ public class WebSocketManager {
|
|||||||
reConnect();
|
reConnect();
|
||||||
//重连后刷新连接时间
|
//重连后刷新连接时间
|
||||||
lastConnectedTime = System.currentTimeMillis();
|
lastConnectedTime = System.currentTimeMillis();
|
||||||
|
} else {
|
||||||
|
socket.send("{\"td\":" + System.currentTimeMillis() + "}");
|
||||||
}
|
}
|
||||||
if (!Constant.INSTANCE.getEnableMediaProject()) {
|
if (!Constant.INSTANCE.getEnableMediaProject()) {
|
||||||
if (System.currentTimeMillis() - lastConnectedTime > heartBeatRate * 3000 && !FloatWindowHelper.INSTANCE.isPause()) {
|
if (System.currentTimeMillis() - lastConnectedTime > heartBeatRate * 3000 && !FloatWindowHelper.INSTANCE.isPause()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user