Merge branch 'master' of github.com:AriaLyy/Aria

pull/330/head
AriaLyy 7 years ago
commit 44ca80044d
  1. 4
      Aria/build.gradle
  2. 1
      Aria/src/main/java/com/arialyy/aria/core/AriaManager.java
  3. 7
      Aria/src/main/java/com/arialyy/aria/core/download/downloader/DownloadGroupUtil.java
  4. 6
      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 {
minSdkVersion 9
targetSdkVersion 23
versionCode 327
versionName "3.2.7"
versionCode 329
versionName "3.2.9"
}
buildTypes {
release {

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

@ -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();
}

@ -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.7'
annotationProcessor 'com.arialyy.aria:aria-compiler:3.2.7'
compile 'com.arialyy.aria:aria-core:3.2.9'
annotationProcessor 'com.arialyy.aria:aria-compiler:3.2.9'
```
## 示例
@ -351,6 +351,8 @@ 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 移除广播事件,增加任务组下载功能
+ v_3.1.9 修复stopAll队列没有任务时崩溃的问题,增加针对单个任务监听的功能

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

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

Loading…
Cancel
Save