From 06a0d764ed0e1e3a4c6b02d2b0b6d90e7369258c Mon Sep 17 00:00:00 2001 From: mxm <1130198893@qq.com> Date: Thu, 16 Apr 2020 09:56:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=BB=84=E5=AD=90=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=A4=9A=E7=BA=BF=E7=A8=8B=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aria/core/group/AbsSubDLoadUtil.java | 55 +------------------ 1 file changed, 1 insertion(+), 54 deletions(-) diff --git a/PublicComponent/src/main/java/com/arialyy/aria/core/group/AbsSubDLoadUtil.java b/PublicComponent/src/main/java/com/arialyy/aria/core/group/AbsSubDLoadUtil.java index 1af9c2fa..3ddcc0ad 100644 --- a/PublicComponent/src/main/java/com/arialyy/aria/core/group/AbsSubDLoadUtil.java +++ b/PublicComponent/src/main/java/com/arialyy/aria/core/group/AbsSubDLoadUtil.java @@ -44,7 +44,6 @@ public abstract class AbsSubDLoadUtil implements IUtil, Runnable { private boolean needGetInfo; private boolean isStop = false, isCancel = false; private String parentKey; - private IDLoadListener mListener; /** * @param schedulers 调度器 @@ -53,62 +52,10 @@ public abstract class AbsSubDLoadUtil implements IUtil, Runnable { protected AbsSubDLoadUtil(DTaskWrapper taskWrapper, Handler schedulers, boolean needGetInfo, String parentKey) { mWrapper = taskWrapper; mSchedulers = schedulers; - mListener=createListener(); this.parentKey = parentKey; this.needGetInfo = needGetInfo; mDLoader = getLoader(); } - private IDLoadListener createListener() { - return new IDLoadListener() { - @Override - public void onPostPre(long fileSize) { - } - - @Override - public void supportBreakpoint(boolean support) { - } - - @Override - public void onPre() { - } - - @Override - public void onStart(long startLocation) { - } - - @Override - public void onResume(long resumeLocation) { - } - - @Override - public void onProgress(long currentLocation) { - Message msg =getSchedulers().obtainMessage(IThreadStateManager.STATE_RUNNING, currentLocation); - Bundle b = new Bundle(); - msg.setData(b); - b.putString(IThreadStateManager.DATA_THREAD_NAME, getKey()); - msg.sendToTarget(); - } - - @Override - public void onStop(long stopLocation) { - } - - @Override - public void onComplete() { - } - - @Override - public void onCancel() { - } - - @Override - public void onFail(boolean needRetry, AriaException e) { - } - - - }; - - } /** * 创建加载器 @@ -150,7 +97,7 @@ public abstract class AbsSubDLoadUtil implements IUtil, Runnable { return; } buildLoaderStructure(); - mDLoader.run(); + new Thread(mDLoader).start(); } /**