diff --git a/Aria/src/main/java/com/arialyy/aria/core/common/ProxyHelper.java b/Aria/src/main/java/com/arialyy/aria/core/common/ProxyHelper.java index a1d64f23..02d799a1 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/common/ProxyHelper.java +++ b/Aria/src/main/java/com/arialyy/aria/core/common/ProxyHelper.java @@ -107,14 +107,16 @@ public class ProxyHelper { } result = new HashSet<>(); try { - if (Class.forName(className.concat("$$DownloadGroupListenerProxy")) != null) { + if (getClass().getClassLoader().loadClass(className.concat("$$DownloadGroupListenerProxy")) + != null) { result.add(PROXY_TYPE_DOWNLOAD_GROUP); } } catch (ClassNotFoundException e) { //e.printStackTrace(); } try { - if (Class.forName(className.concat("$$DownloadListenerProxy")) != null) { + if (getClass().getClassLoader().loadClass(className.concat("$$DownloadListenerProxy")) + != null) { result.add(PROXY_TYPE_DOWNLOAD); } } catch (ClassNotFoundException e) { @@ -122,7 +124,8 @@ public class ProxyHelper { } try { - if (Class.forName(className.concat("$$UploadListenerProxy")) != null) { + if (getClass().getClassLoader().loadClass(className.concat("$$UploadListenerProxy")) + != null) { result.add(PROXY_TYPE_UPLOAD); } } catch (ClassNotFoundException e) { diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/downloader/SimpleDownloadUtil.java b/Aria/src/main/java/com/arialyy/aria/core/download/downloader/SimpleDownloadUtil.java index d5a35dd6..0e5e0267 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/downloader/SimpleDownloadUtil.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/downloader/SimpleDownloadUtil.java @@ -107,14 +107,15 @@ public class SimpleDownloadUtil implements IUtil, Runnable { if (isStop || isCancel) { return; } - if (mTaskWrapper.getEntity().getFileSize() <= 1 - || mTaskWrapper.isRefreshInfo() - || mTaskWrapper.getRequestType() == AbsTaskWrapper.D_FTP - || mTaskWrapper.getState() == IEntity.STATE_FAIL) { - new Thread(createInfoThread()).start(); - } else { - mDownloader.start(); - } + //if (mTaskWrapper.getEntity().getFileSize() <= 1 + // || mTaskWrapper.isRefreshInfo() + // || mTaskWrapper.getRequestType() == AbsTaskWrapper.D_FTP + // || mTaskWrapper.getState() == IEntity.STATE_FAIL) { + // new Thread(createInfoThread()).start(); + //} else { + // mDownloader.start(); + //} + new Thread(createInfoThread()).start(); } /** diff --git a/Aria/src/main/java/com/arialyy/aria/core/inf/AbsTask.java b/Aria/src/main/java/com/arialyy/aria/core/inf/AbsTask.java index 9d073620..e32886f9 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/inf/AbsTask.java +++ b/Aria/src/main/java/com/arialyy/aria/core/inf/AbsTask.java @@ -207,7 +207,7 @@ public abstract class AbsTask'`替换为 ``` @@ -102,8 +102,13 @@ protected void onCreate(Bundle savedInstanceState) { ### 版本日志 - + v_3.5.4 (2019/1/8) - - 修复不支持断点的下载地址,重复下载出现的数据库主键冲突问题 + + v_3.6(2019/2/27) + - 优化数据库写入\修改的速度 + - 精减任务实体的存储 + - 增加下载组合任务的配置 + - useBroadcast\notNetRetry这两个配置,统一在AppConfig中配置 + - fix bug https://github.com/AriaLyy/Aria/issues/361 + - fix bug https://github.com/AriaLyy/Aria/issues/365 [更多版本记录](https://github.com/AriaLyy/Aria/blob/master/DEV_LOG.md) diff --git a/app/src/main/java/com/arialyy/simple/download/DownloadActivity.java b/app/src/main/java/com/arialyy/simple/download/DownloadActivity.java index 3e965d4c..6110ae1a 100644 --- a/app/src/main/java/com/arialyy/simple/download/DownloadActivity.java +++ b/app/src/main/java/com/arialyy/simple/download/DownloadActivity.java @@ -24,6 +24,7 @@ import android.view.Gravity; import android.view.View; import android.widget.Button; import butterknife.Bind; +import com.arialyy.aria.core.Aria; import com.arialyy.frame.permission.OnPermissionCallback; import com.arialyy.frame.permission.PermissionManager; import com.arialyy.frame.util.show.T; diff --git a/build.gradle b/build.gradle index 73ef4f5d..cf85cc6c 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,7 @@ task clean(type: Delete) { ext { userOrg = 'arialyy' groupId = 'com.arialyy.aria' - publishVersion = '3.5.4' + publishVersion = '3.6' // publishVersion = '1.0.4' //FTP插件 repoName='maven' desc = 'android 下载框架'