From 3abb8d84f72fe3c55b92148df9bd5c040bd5200f Mon Sep 17 00:00:00 2001 From: AriaLyy <511455842@qq.com> Date: Tue, 15 Aug 2017 11:13:04 +0800 Subject: [PATCH] 3.2.19 --- README.md | 4 +-- .../com/arialyy/aria/core/Configuration.java | 25 +++++++++++++------ build.gradle | 2 +- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f6173e8b..50eb1804 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,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.17' -annotationProcessor 'com.arialyy.aria:aria-compiler:3.2.17' +compile 'com.arialyy.aria:aria-core:3.2.19' +annotationProcessor 'com.arialyy.aria:aria-compiler:3.2.19' ``` ## 示例 diff --git a/aria/src/main/java/com/arialyy/aria/core/Configuration.java b/aria/src/main/java/com/arialyy/aria/core/Configuration.java index e65f4218..3aeca30e 100644 --- a/aria/src/main/java/com/arialyy/aria/core/Configuration.java +++ b/aria/src/main/java/com/arialyy/aria/core/Configuration.java @@ -18,6 +18,7 @@ package com.arialyy.aria.core; import android.text.TextUtils; import com.arialyy.aria.core.common.QueueMod; import com.arialyy.aria.core.queue.DownloadTaskQueue; +import com.arialyy.aria.core.queue.UploadTaskQueue; import com.arialyy.aria.util.CommonUtil; import java.io.File; import java.lang.reflect.Field; @@ -86,14 +87,6 @@ class Configuration { return maxTaskNum; } - public BaseConfig setMaxTaskNum(int maxTaskNum) { - oldMaxTaskNum = this.maxTaskNum; - this.maxTaskNum = maxTaskNum; - saveKey("maxTaskNum", maxTaskNum + ""); - DownloadTaskQueue.getInstance().setMaxTaskNum(maxTaskNum); - return this; - } - public int getReTryNum() { return reTryNum; } @@ -250,6 +243,14 @@ class Configuration { */ double msxSpeed = 0.0; + public DownloadConfig setMaxTaskNum(int maxTaskNum) { + oldMaxTaskNum = this.maxTaskNum; + this.maxTaskNum = maxTaskNum; + saveKey("maxTaskNum", maxTaskNum + ""); + DownloadTaskQueue.getInstance().setMaxTaskNum(maxTaskNum); + return this; + } + public int getIOTimeOut() { return iOTimeOut; } @@ -332,6 +333,14 @@ class Configuration { private static UploadConfig INSTANCE = null; + public UploadConfig setMaxTaskNum(int maxTaskNum) { + oldMaxTaskNum = this.maxTaskNum; + this.maxTaskNum = maxTaskNum; + saveKey("maxTaskNum", maxTaskNum + ""); + UploadTaskQueue.getInstance().setMaxTaskNum(maxTaskNum); + return this; + } + static UploadConfig getInstance() { if (INSTANCE == null) { synchronized (DownloadConfig.class) { diff --git a/build.gradle b/build.gradle index da4f3c6e..2b6a3686 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,7 @@ task clean(type: Delete) { ext { userOrg = 'arialyy' groupId = 'com.arialyy.aria' - publishVersion = '3.2.18' + publishVersion = '3.2.19' repoName='maven' desc = 'android 下载框架' website = 'https://github.com/AriaLyy/Aria'