关闭ios推图的同时关闭wda的推图
parent
d5f77b7295
commit
2633f64fa9
|
@ -3,6 +3,7 @@ package net.northking.cctp.upperComputer.deviceManager.screen;
|
|||
import net.northking.cctp.upperComputer.constants.ResponseCmd;
|
||||
import net.northking.cctp.upperComputer.deviceManager.IOSDeviceManager;
|
||||
import net.northking.cctp.upperComputer.deviceManager.thread.IosDeviceInitThread;
|
||||
import net.northking.cctp.upperComputer.driver.ios.NKAgent;
|
||||
import net.northking.cctp.upperComputer.driver.usbmuxd.AppleDevice;
|
||||
import net.northking.cctp.upperComputer.driver.usbmuxd.UsbMuxd;
|
||||
import net.northking.cctp.upperComputer.driver.usbmuxd.UsbMuxdConnectFailedException;
|
||||
|
@ -279,6 +280,13 @@ public class IosScreenResponseThread extends ImageScreenResponse {
|
|||
logger.warn("设备【{}】关闭图像抓取失败。。。。。", phone.getUdid(), e);
|
||||
}
|
||||
}
|
||||
//发送消息通知wda停止获取图片
|
||||
IosDeviceInitThread iosInitThread = IOSDeviceManager.getInstance().getIosInitThread(phone.getUdid());
|
||||
if (null != iosInitThread && !iosInitThread.isInterrupted() && iosInitThread.isAlive()) {
|
||||
NKAgent nkAgent = iosInitThread.getNkAgent();
|
||||
boolean success = nkAgent.disconnectAllMJpegSever();
|
||||
logger.info("通知wda取消推图的结果:{}",success);
|
||||
}
|
||||
IOSDeviceManager.getInstance().removeScreenThread(phone.getUdid());
|
||||
interrupt();
|
||||
}
|
||||
|
|
|
@ -222,6 +222,25 @@ public final class NKAgent {
|
|||
return bool.isSuccess();
|
||||
}
|
||||
|
||||
public String activeAppBundleId() {
|
||||
ICommandPacket packet = packetTransfer.syncSend(30);
|
||||
TextData data = new TextData();
|
||||
packet.fillICommandData(data);
|
||||
return data.text;
|
||||
}
|
||||
|
||||
/*
|
||||
停止所有推图流
|
||||
*/
|
||||
public boolean disconnectAllMJpegSever() {
|
||||
ICommandPacket packet = packetTransfer.syncSend(31);
|
||||
if (packet == null) return false;
|
||||
BooleanCommandData bool = new BooleanCommandData();
|
||||
packet.fillICommandData(bool);
|
||||
return bool.isSuccess();
|
||||
}
|
||||
|
||||
|
||||
public boolean getStatus() {
|
||||
return this.packetTransfer.isConnected();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue