From 3d897ee83c98bac7b9c4f5a4340241a0c065e9e4 Mon Sep 17 00:00:00 2001 From: AriaLyy <511455842@qq.com> Date: Wed, 26 Jul 2017 20:38:01 +0800 Subject: [PATCH] 3.2.9 --- Aria/build.gradle | 4 ++-- Aria/src/main/java/com/arialyy/aria/core/AriaManager.java | 1 - .../aria/core/download/downloader/DownloadGroupUtil.java | 7 +++---- README.md | 5 +++-- .../simple/download/group/DownloadGroupActivity.java | 5 +++++ build.gradle | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Aria/build.gradle b/Aria/build.gradle index bb418815..1e2366c1 100644 --- a/Aria/build.gradle +++ b/Aria/build.gradle @@ -7,8 +7,8 @@ android { defaultConfig { minSdkVersion 9 targetSdkVersion 23 - versionCode 327 - versionName "3.2.7" + versionCode 329 + versionName "3.2.9" } buildTypes { release { diff --git a/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java b/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java index 41bb1525..9ef1995a 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java +++ b/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java @@ -327,7 +327,6 @@ import org.xml.sax.SAXException; receiver.unRegister(); receiver.destroy(); iter.remove(); - break; } } } diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/downloader/DownloadGroupUtil.java b/Aria/src/main/java/com/arialyy/aria/core/download/downloader/DownloadGroupUtil.java index fefe5a20..ab3cb6d8 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/downloader/DownloadGroupUtil.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/downloader/DownloadGroupUtil.java @@ -374,12 +374,11 @@ public class DownloadGroupUtil implements IDownloadUtil { handleSpeed(0); mListener.onSubComplete(entity); //如果子任务完成的数量和总任务数一致,表示任务组任务已经完成 - if (mCompleteNum >= mTaskEntity.getEntity().getSubTask().size()){ + if (mCompleteNum >= mTaskEntity.getEntity().getSubTask().size()) { closeTimer(false); mListener.onComplete(); - } - //如果子任务完成数量加上失败的数量和总任务数一致,则任务组停止下载 - if (mCompleteNum + mFailNum >= mActualTaskNum) { + } else if (mCompleteNum + mFailNum >= mActualTaskNum) { + //如果子任务完成数量加上失败的数量和总任务数一致,则任务组停止下载 closeTimer(false); mListener.onComplete(); } diff --git a/README.md b/README.md index 6caf0221..fd50a1a5 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ Aria怎样使用? [![Download](https://api.bintray.com/packages/arialyy/maven/AriaApi/images/download.svg)](https://bintray.com/arialyy/maven/AriaApi/_latestVersion) [![Download](https://api.bintray.com/packages/arialyy/maven/AriaCompiler/images/download.svg)](https://bintray.com/arialyy/maven/AriaCompiler/_latestVersion) ```java -compile 'com.arialyy.aria:aria-core:3.2.8' -annotationProcessor 'com.arialyy.aria:aria-compiler:3.2.8' +compile 'com.arialyy.aria:aria-core:3.2.9' +annotationProcessor 'com.arialyy.aria:aria-compiler:3.2.9' ``` ## 示例 @@ -351,6 +351,7 @@ Aria.download(this).load(DOWNLOAD_URL).setExtendField(str) ## 开发日志 + + v_3.2.9 修复任务组下载完成两次回掉的问题,修复又是获取不到下载状态的问题 + v_3.2.8 修复下载超过2G大小的文件失败的问题 + v_3.2.7 移除设置文件名的api接口,修复断开网络时出现的进度条错误的问题 + v_3.2.6 移除广播事件,增加任务组下载功能 diff --git a/app/src/main/java/com/arialyy/simple/download/group/DownloadGroupActivity.java b/app/src/main/java/com/arialyy/simple/download/group/DownloadGroupActivity.java index b5471182..e5a3f002 100644 --- a/app/src/main/java/com/arialyy/simple/download/group/DownloadGroupActivity.java +++ b/app/src/main/java/com/arialyy/simple/download/group/DownloadGroupActivity.java @@ -94,6 +94,9 @@ public class DownloadGroupActivity extends BaseActivity