Commit b3f5ba97 authored by liuyang's avatar liuyang

增加程序前台判断逻辑,应用退出后任务恢复

parent 0a22420e
......@@ -85,22 +85,14 @@ class Task : IAppBaseCallback {
this.prepareReport()
// 启动应用
this.launchApp()
// if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
// if (!AdbUtil.isAppActive(this.apkInfo.packageName)) {
// Log.i(TAG, "Launch app failed")
// // 退出应用
// AdbUtil.stopApp(this.apkInfo.packageName)
// finish(false)
// return
// }
// }
// 频道轮询处理
try {
val success = this.processChannels()
// 尝试两次
// 再次尝试
if (!success) {
this.reset()
this.prepareReport()
this.launchApp()
this.processChannels()
}
// 上传图片
......
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