Compare commits
No commits in common. "47b6c0d7288def3590043044dba0b101ef162cf1" and "0e785a67a5ebb39ef8ab2e31222368472cfce43c" have entirely different histories.
47b6c0d728
...
0e785a67a5
|
@ -138,10 +138,15 @@ public class AndroidAgentSession {
|
|||
* 安静地关闭流
|
||||
*/
|
||||
public void closeSilence() {
|
||||
if (null != this.sendThread) {
|
||||
this.sendThread.interrupt();
|
||||
}
|
||||
try {
|
||||
state = false;
|
||||
logger.debug("关闭设备【{}】的agentSession连接",serial);
|
||||
if (transport != null) {
|
||||
transport.close();
|
||||
}
|
||||
} catch (IOException ignore) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private class CommandSendThread extends Thread {
|
||||
|
@ -163,14 +168,7 @@ public class AndroidAgentSession {
|
|||
break;
|
||||
}
|
||||
}
|
||||
try {
|
||||
logger.debug("关闭设备【{}】的agentSession连接",serial);
|
||||
if (transport != null) {
|
||||
transport.close();
|
||||
}
|
||||
} catch (IOException ignore) {
|
||||
|
||||
}
|
||||
closeSilence();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package net.northking.cctp.upperComputer.service;
|
|||
import cn.hutool.core.codec.Base64;
|
||||
import cn.hutool.core.img.ImgUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.appium.java_client.AppiumDriver;
|
||||
import io.appium.java_client.android.AndroidDriver;
|
||||
import io.appium.java_client.ios.IOSDriver;
|
||||
|
@ -865,20 +864,17 @@ public class AndroidDebuggerServiceImpl extends AbstractDebuggerService {
|
|||
|
||||
@Override
|
||||
public String endRecord(DebuggerDeviceInfo info) {
|
||||
String videoUrl = null;
|
||||
String result = null;
|
||||
logger.info("收到设备【{}】在任务【{}】关闭录屏的请求............",info.getDeviceId(),info.getTaskId());
|
||||
AndroidScreenResponseThread screenThread = AndroidDeviceManager.getInstance().getScreenThread(info.getDeviceId());
|
||||
if (null != screenThread && screenThread.isAlive() && !screenThread.isInterrupted()) {
|
||||
String result = screenThread.stopRecord();
|
||||
JSONObject jsonObject = JSON.parseObject(result, JSONObject.class);
|
||||
videoUrl = jsonObject.getString("videoUrl");
|
||||
logger.info("设备【{}】在任务【{}】录屏关闭,得到的视频地址为:{}",info.getDeviceId(),info.getTaskId(),videoUrl);
|
||||
return videoUrl;
|
||||
result = screenThread.stopRecord();
|
||||
return result;
|
||||
} else {
|
||||
logger.info("设备【{}】在任务【{}】录屏不存在............",info.getDeviceId(),info.getTaskId());
|
||||
}
|
||||
logger.info("设备【{}】在任务【{}】录屏保存的地址:{}............",info.getDeviceId(),info.getTaskId(),videoUrl);
|
||||
return videoUrl;
|
||||
logger.info("设备【{}】在任务【{}】录屏保存的地址:{}............",info.getDeviceId(),info.getTaskId(),result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -248,20 +248,17 @@ public class IosDebuggerServiceImpl extends AbstractDebuggerService {
|
|||
|
||||
@Override
|
||||
public String endRecord(DebuggerDeviceInfo info) {
|
||||
String videoUrl = null;
|
||||
String result = null;
|
||||
logger.info("收到设备【{}】在任务【{}】关闭录屏的请求............",info.getDeviceId(),info.getTaskId());
|
||||
IosScreenResponseThread screenThread = IOSDeviceManager.getInstance().getScreenThread(info.getDeviceId());
|
||||
if (null != screenThread && screenThread.isAlive() && !screenThread.isInterrupted()) {
|
||||
String result = screenThread.stopRecord();
|
||||
JSONObject jsonObject = JSON.parseObject(result, JSONObject.class);
|
||||
videoUrl = jsonObject.getString("videoUrl");
|
||||
logger.info("设备【{}】在任务【{}】录屏关闭,得到的视频地址为:{}",info.getDeviceId(),info.getTaskId(),videoUrl);
|
||||
return videoUrl;
|
||||
result = screenThread.stopRecord();
|
||||
return result;
|
||||
} else {
|
||||
logger.info("设备【{}】在任务【{}】录屏不存在............",info.getDeviceId(),info.getTaskId());
|
||||
}
|
||||
logger.info("设备【{}】在任务【{}】录屏保存的地址:{}............",info.getDeviceId(),info.getTaskId(),videoUrl);
|
||||
return videoUrl;
|
||||
logger.info("设备【{}】在任务【{}】录屏保存的地址:{}............",info.getDeviceId(),info.getTaskId(),result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue