Commit 88162ac4 authored by liuyang's avatar liuyang

APK图片抓取识别及轮播流地址抓取,客户端任务控制

#BYLSERVER-1438
parent d453a8b0
...@@ -16,16 +16,21 @@ class TaskManager { ...@@ -16,16 +16,21 @@ class TaskManager {
private val runnable = Runnable { private val runnable = Runnable {
val dist = System.currentTimeMillis() - updateTime val dist = System.currentTimeMillis() - updateTime
while (isRunning && this.status == 0) { while (isRunning) {
for (task in tasks) { if (this.status == IDLE) {
task.reset() for (task in tasks) {
task.reset()
currentTask = task currentTask = task
currentTask!!.start() currentTask!!.start()
} }
this.status = COMPLETE this.status = COMPLETE
}
else {
Log.i(TAG, "no task running")
}
Thread.sleep(3 * 1000) Thread.sleep(3 * 1000)
} }
......
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