From 80212ad8105000bc8fb842c82fc4cf945c391dd1 Mon Sep 17 00:00:00 2001 From: laoyuyu Date: Mon, 6 Mar 2023 22:58:42 +0800 Subject: [PATCH] Code optimization --- .../arialyy/aria/core/inf/IBlockManager.java | 50 +------------------ 1 file changed, 1 insertion(+), 49 deletions(-) diff --git a/PublicComponent/src/main/java/com/arialyy/aria/core/inf/IBlockManager.java b/PublicComponent/src/main/java/com/arialyy/aria/core/inf/IBlockManager.java index 9d1b1a2c..285e9fa1 100644 --- a/PublicComponent/src/main/java/com/arialyy/aria/core/inf/IBlockManager.java +++ b/PublicComponent/src/main/java/com/arialyy/aria/core/inf/IBlockManager.java @@ -15,7 +15,6 @@ */ package com.arialyy.aria.core.inf; -import android.os.Handler; import com.arialyy.aria.core.task.IThreadTask; import com.arialyy.aria.orm.entity.BlockRecord; import java.util.List; @@ -23,62 +22,15 @@ import java.util.List; /** * 线程任务状态 */ -public interface IBlockManager { - int STATE_STOP = 0x01; - int STATE_FAIL = 0x02; - int STATE_CANCEL = 0x03; - int STATE_COMPLETE = 0x04; - int STATE_RUNNING = 0x05; - int STATE_UPDATE_PROGRESS = 0x06; - int STATE_PRE = 0x07; - int STATE_START = 0x08; - String DATA_RETRY = "DATA_RETRY"; - String DATA_ERROR_INFO = "DATA_ERROR_INFO"; - String DATA_THREAD_NAME = "DATA_THREAD_NAME"; - String DATA_THREAD_LOCATION = "DATA_THREAD_LOCATION"; - String DATA_ADD_LEN = "DATA_ADD_LEN"; // 增加的长度 - - void setLooper(); +public interface IBlockManager extends ITaskManager { void start(List threadTaskList); - void stop(); - void setBlockNum(int blockNum); void putUnfinishedBlock(BlockRecord record); List getUnfinishedBlockList(); - /** - * 是否有失败的快 - * - * @return true 有失败的快 - */ - boolean hasFailedBlock(); - - /** - * 任务是否已经完成 - * - * @return true 任务已完成 - */ - boolean isCompleted(); - - /** - * 获取当前任务进度 - * - * @return 任务当前进度 - */ - long getCurrentProgress(); - - boolean isStopped(); - - boolean isCanceled(); - - boolean isRunning(); - /** - * 创建handler 回调 - */ - Handler getHandler(); }