|
|
@ -22,6 +22,8 @@ import android.os.Message; |
|
|
|
|
|
|
|
|
|
|
|
import com.arialyy.aria.core.TaskRecord; |
|
|
|
import com.arialyy.aria.core.TaskRecord; |
|
|
|
import com.arialyy.aria.core.inf.IThreadStateManager; |
|
|
|
import com.arialyy.aria.core.inf.IThreadStateManager; |
|
|
|
|
|
|
|
import com.arialyy.aria.core.listener.IEventListener; |
|
|
|
|
|
|
|
import com.arialyy.aria.exception.AriaException; |
|
|
|
import com.arialyy.aria.util.ALog; |
|
|
|
import com.arialyy.aria.util.ALog; |
|
|
|
import com.arialyy.aria.util.CommonUtil; |
|
|
|
import com.arialyy.aria.util.CommonUtil; |
|
|
|
import com.arialyy.aria.util.FileUtil; |
|
|
|
import com.arialyy.aria.util.FileUtil; |
|
|
@ -53,7 +55,7 @@ public class GroupSubThreadStateManager implements IThreadStateManager { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* @param handler 任务事件 |
|
|
|
* @param handler 任务事件 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public GroupSubThreadStateManager(Handler handler, String key) { |
|
|
|
public GroupSubThreadStateManager(Handler handler,String key) { |
|
|
|
mHandler = handler; |
|
|
|
mHandler = handler; |
|
|
|
mKey = key; |
|
|
|
mKey = key; |
|
|
|
} |
|
|
|
} |
|
|
@ -101,7 +103,7 @@ public class GroupSubThreadStateManager implements IThreadStateManager { |
|
|
|
(AriaException) b.getSerializable(DATA_ERROR_INFO));*/ |
|
|
|
(AriaException) b.getSerializable(DATA_ERROR_INFO));*/ |
|
|
|
quitLooper(); |
|
|
|
quitLooper(); |
|
|
|
} |
|
|
|
} |
|
|
|
sendMessageFromMsg(msg); |
|
|
|
//sendMessageFromMsg(msg);
|
|
|
|
break; |
|
|
|
break; |
|
|
|
case STATE_COMPLETE: |
|
|
|
case STATE_COMPLETE: |
|
|
|
mCompleteNum.getAndIncrement(); |
|
|
|
mCompleteNum.getAndIncrement(); |
|
|
@ -131,6 +133,9 @@ public class GroupSubThreadStateManager implements IThreadStateManager { |
|
|
|
//mListener.onComplete();
|
|
|
|
//mListener.onComplete();
|
|
|
|
} |
|
|
|
} |
|
|
|
quitLooper(); |
|
|
|
quitLooper(); |
|
|
|
|
|
|
|
}else if (isFail()) { |
|
|
|
|
|
|
|
sendMessageFromMsg(msg); |
|
|
|
|
|
|
|
quitLooper(); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case STATE_RUNNING: |
|
|
|
case STATE_RUNNING: |
|
|
|