pull/330/head
AriaLyy 7 years ago
parent f2ee455daf
commit 3d897ee83c
  1. 4
      Aria/build.gradle
  2. 1
      Aria/src/main/java/com/arialyy/aria/core/AriaManager.java
  3. 5
      Aria/src/main/java/com/arialyy/aria/core/download/downloader/DownloadGroupUtil.java
  4. 5
      README.md
  5. 5
      app/src/main/java/com/arialyy/simple/download/group/DownloadGroupActivity.java
  6. 2
      build.gradle

@ -7,8 +7,8 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 9 minSdkVersion 9
targetSdkVersion 23 targetSdkVersion 23
versionCode 327 versionCode 329
versionName "3.2.7" versionName "3.2.9"
} }
buildTypes { buildTypes {
release { release {

@ -327,7 +327,6 @@ import org.xml.sax.SAXException;
receiver.unRegister(); receiver.unRegister();
receiver.destroy(); receiver.destroy();
iter.remove(); iter.remove();
break;
} }
} }
} }

@ -374,12 +374,11 @@ public class DownloadGroupUtil implements IDownloadUtil {
handleSpeed(0); handleSpeed(0);
mListener.onSubComplete(entity); mListener.onSubComplete(entity);
//如果子任务完成的数量和总任务数一致,表示任务组任务已经完成 //如果子任务完成的数量和总任务数一致,表示任务组任务已经完成
if (mCompleteNum >= mTaskEntity.getEntity().getSubTask().size()){ if (mCompleteNum >= mTaskEntity.getEntity().getSubTask().size()) {
closeTimer(false); closeTimer(false);
mListener.onComplete(); mListener.onComplete();
} } else if (mCompleteNum + mFailNum >= mActualTaskNum) {
//如果子任务完成数量加上失败的数量和总任务数一致,则任务组停止下载 //如果子任务完成数量加上失败的数量和总任务数一致,则任务组停止下载
if (mCompleteNum + mFailNum >= mActualTaskNum) {
closeTimer(false); closeTimer(false);
mListener.onComplete(); mListener.onComplete();
} }

@ -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/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) [![Download](https://api.bintray.com/packages/arialyy/maven/AriaCompiler/images/download.svg)](https://bintray.com/arialyy/maven/AriaCompiler/_latestVersion)
```java ```java
compile 'com.arialyy.aria:aria-core:3.2.8' compile 'com.arialyy.aria:aria-core:3.2.9'
annotationProcessor 'com.arialyy.aria:aria-compiler:3.2.8' 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.8 修复下载超过2G大小的文件失败的问题
+ v_3.2.7 移除设置文件名的api接口,修复断开网络时出现的进度条错误的问题 + v_3.2.7 移除设置文件名的api接口,修复断开网络时出现的进度条错误的问题
+ v_3.2.6 移除广播事件,增加任务组下载功能 + v_3.2.6 移除广播事件,增加任务组下载功能

@ -94,6 +94,9 @@ public class DownloadGroupActivity extends BaseActivity<ActivityDownloadGroupBin
@DownloadGroup.onTaskPre() protected void onTaskPre(DownloadGroupTask task) { @DownloadGroup.onTaskPre() protected void onTaskPre(DownloadGroupTask task) {
L.d(TAG, "group task pre"); L.d(TAG, "group task pre");
getBinding().setFileSize(task.getConvertFileSize()); getBinding().setFileSize(task.getConvertFileSize());
if (mChildList.getSubData().size() <= 0){
mChildList.addData(task.getEntity().getSubTask());
}
} }
@DownloadGroup.onTaskStart() void taskStart(DownloadGroupTask task) { @DownloadGroup.onTaskStart() void taskStart(DownloadGroupTask task) {
@ -126,6 +129,8 @@ public class DownloadGroupActivity extends BaseActivity<ActivityDownloadGroupBin
@DownloadGroup.onTaskComplete() void taskComplete(DownloadGroupTask task) { @DownloadGroup.onTaskComplete() void taskComplete(DownloadGroupTask task) {
getBinding().setProgress(100); getBinding().setProgress(100);
getBinding().setSpeed("");
mChildList.updateChildProgress(task.getEntity().getSubTask());
T.showShort(this, "任务组下载完成"); T.showShort(this, "任务组下载完成");
} }
} }

@ -37,7 +37,7 @@ task clean(type: Delete) {
ext { ext {
userOrg = 'arialyy' userOrg = 'arialyy'
groupId = 'com.arialyy.aria' groupId = 'com.arialyy.aria'
publishVersion = '3.2.8' publishVersion = '3.2.9'
repoName='maven' repoName='maven'
desc = 'android 下载框架' desc = 'android 下载框架'
website = 'https://github.com/AriaLyy/Aria' website = 'https://github.com/AriaLyy/Aria'

Loading…
Cancel
Save