Commit 38ea59bf authored by liuyang's avatar liuyang

手动停止修复,应用重置

parent d8629fba
......@@ -32,7 +32,8 @@ class Task : IAppBaseCallback {
"3" to "截图失败",
"4" to "图片上传中",
"5" to "上报失败",
"6" to "处理完成")
"6" to "处理完成",
"7" to "手动停止")
lateinit var apkInfo: ApkInfo
// 截图存放路径
......@@ -96,7 +97,10 @@ class Task : IAppBaseCallback {
val success = this.processChannels(0)
// 再次尝试
if (!success) {
this.launchApp()
if (this.status == "7")
return
this.launchApp(true)
// 重新切换到上次崩溃的频道,接着抓取
for (i in 0 until this.channelIndex) {
AdbUtil.sendMultiKey(this.apkInfo.channelKeyEvent)
......@@ -133,6 +137,7 @@ class Task : IAppBaseCallback {
fun destroy() {
// 杀掉tcpdump进程
this.status = "7"
AdbUtil.killTcpdump()
// 退出应用
......@@ -175,6 +180,9 @@ class Task : IAppBaseCallback {
Log.i(TAG, "processChannels")
step()
for (i in index + 1 until this.apkInfo.channelCount) {
if (this.status == "7")
return false
// 模拟按键事件. 切换频道进行抓取
this.channelIndex = i
capture(apkInfo.captureDelay)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment