Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cc60e82

Browse files
committedJun 12, 2016
chore(upgrade): upgrade version name(0.3.1->0.3.2) code(22->23)
1 parent 9802921 commit cc60e82

File tree

5 files changed

+64
-7
lines changed

5 files changed

+64
-7
lines changed
 

‎CHANGELOG-ZH.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@
22

33
> [ Change log in english](https://github.com/lingochamp/FileDownloader/blob/master/CHANGELOG.md)
44
5+
## Version 0.3.2
6+
7+
_2016-06-12_
8+
9+
#### 新接口
10+
11+
- 添加 `BaseDownloadTask#setCallbackProgressMinInterval`: 用于设置每个'progress'方法回调的间隔。 Closes #167 .
12+
- 添加 `FileDownloader#setMaxNetworkThreadCount`: 用于设置最大同时下载的数目(最大同时运行的网络线程)。 Closes #168.
13+
- 添加 `FileDownloader#init(Context,OkHttpClientCustomMaker,int)`: 在下载服务初始化的时候接受设置最大同时下载数目(最大同时运行的网络线程)。 Closes #168.
14+
15+
#### 性能与提高
16+
17+
- 提高稳定性: 确保每个'progress'回调方法之间的最小间隔是5ms,防止对于一个任务而言'progress'回调太频繁导致'防掉帧队列'极速膨胀导致各类Action响应都延时。 Closes #167.
18+
- 提高实用性: 在请求的操作需要在下载服务中完成,但是还未连接上下载服务时,输出对应的'warn'级别的日志。
19+
- 提高性能: 使用`SparseArray`代替`HashMap`用于索引所有的`FileDownloadModel`
20+
21+
#### 修复
22+
23+
- 修复(crash): 修复在某个下载任务开始下载时,发现任务的状态不正确的情况下,输出日志中提供了错误的参数类型导致的Crash。
24+
- 修复(强制重新下载): 修复错误逻辑导致设置`BaseDownloadTask#setForceReDownload(true)`并且任务已经下载完成会促发'warn'的回调,却没有进行强制重新下载的Bug。
25+
- 修复(class-type): 保持`SocketTimeOutException`的Class类型,不再关心`Throwable``message`是否为空。
26+
27+
#### 其他
28+
29+
- 所依赖的okhttp从`3.2.0`升到`3.3.1`
30+
531
## Version 0.3.1
632

733
_2016-05-19_

‎CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@
22

33
> [中文迭代日志](https://github.com/lingochamp/FileDownloader/blob/master/CHANGELOG-ZH.md)
44
5+
## Version 0.3.2
6+
7+
_2016-06-12_
8+
9+
#### New Interfaces
10+
11+
- Add `BaseDownloadTask#setCallbackProgressMinInterval`: Set the minimum time interval between each callback of 'progress'. Closes #167.
12+
- Add `FileDownloader#setMaxNetworkThreadCount`: Change the number of simultaneous downloads(the number of the simultaneously running network threads) at the code side. Closes #168.
13+
- Add `FileDownloader#init(Context,OkHttpClientCustomMaker,int)`: Accept initializing the number of simultaneous downloads(the number of the simultaneously running network threads) with the FileDownloadService initializes. Closes #168.
14+
15+
#### Enhancement
16+
17+
- Improve Robust: Ensure the minimum time interval between each callback of 'progress' is 5ms, To prevent internal callback of 'progress' too frequent happening. Closes #167.
18+
- Improve Practicability: Print the 'warn' priority log when a request does something in the FileDownloadService but it isn't connected yet.
19+
- Improve Performance: Using the `SparseArray` instead of `HashMap` for mapping all `FileDownloadModel`.
20+
21+
#### Fix
22+
23+
- Fix(crash): Fix provided wrong params in formatting character string when to starting download runnable occur the unexpected downloading status.
24+
- Fix(force-re-download): Fix the wrong logic: In the case of `BaseDownloadTask#setForceReDownload(true)` and the task has already downloaded will trigger 'warn' callback. Closes #169 .
25+
- Fix(class-type): Keep the class type of `SocketTimeOutException`, and no longer care about whether the message of Throwable is empty, this is very redundant.
26+
27+
#### Others
28+
29+
- Upgrade dependency okhttp from `3.2.0` to `3.3.1`.
30+
531
## Version 0.3.1
632

733
_2016-05-19_

‎README-zh.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Android 文件下载引擎,稳定、高效、简单易用
88

99
> [README DOC](https://github.com/lingochamp/FileDownloader/blob/master/README.md)
1010
11-
> 本引擎依赖okhttp 3.2.0
11+
> 本引擎依赖okhttp 3.3.1
1212
1313
---
1414
#### 版本迭代日志: [Change Log](https://github.com/lingochamp/FileDownloader/blob/master/CHANGELOG.md)
@@ -61,7 +61,7 @@ Android 文件下载引擎,稳定、高效、简单易用
6161
在项目中引用:
6262

6363
```
64-
compile 'com.liulishuo.filedownloader:library:0.3.1'
64+
compile 'com.liulishuo.filedownloader:library:0.3.2'
6565
```
6666

6767
#### 全局初始化在`Application.onCreate`
@@ -233,6 +233,7 @@ if (parallel) {
233233
| --- | ---
234234
| init(Context) | 缓存Context,不会启动下载进程
235235
| init(Context, OkHttpClientCustomMaker) | 缓存Context,不会启动下载进程;在下载进程启动的时候,初始化OkHttpClient
236+
| init(Context, OkHttpClientCustomMaker, int) | 缓存Context,不会启动下载进程;在下载进程启动的时候,初始化OkHttpClient,并且根据提供的最大同时下载数创建网络线程线程池
236237
| create(url:String) | 创建一个下载任务
237238
| start(listener:FileDownloadListener, isSerial:boolean) | 启动是相同监听器的任务,串行/并行启动
238239
| pause(listener:FileDownloadListener) | 暂停启动相同监听器的任务
@@ -254,6 +255,7 @@ if (parallel) {
254255
| stopForeground(removeNotification:boolean) | 取消FileDownloadService的前台模式
255256
| setTaskCompleted(url:String, path:String, totalBytes:long) | 用于告诉FileDownloader引擎,以指定Url与Path的任务已经通过其他方式(非FileDownloader)下载完成
256257
| setTaskCompleted(taskAtomList:List<FileDownloadTaskAtom>) | 用于告诉FileDownloader引擎,指定的一系列的任务都已经通过其他方式(非FileDownloader)下载完成
258+
| setMaxNetworkThreadCount(int) | 设置最大并行下载的数目(网络下载线程数), [1,12]
257259

258260

259261
#### Task接口说明
@@ -262,7 +264,9 @@ if (parallel) {
262264
| --- | ---
263265
| setPath(path:String) | 下载文件的存储绝对路径
264266
| setListener(listener:FileDownloadListener) | 设置监听,可以以相同监听组成队列
265-
| setCallbackProgressTimes(times:int) | 设置FileDownloadListener#progress最大回调次数
267+
| setCallbackProgressTimes(times:int) | 设置整个下载过程中`FileDownloadListener#progress`最大回调次数
268+
| setCallbackProgressIgnored() | 忽略所有的`FileDownloadListener#progress`的回调
269+
| setCallbackProgressMinInterval(minIntervalMillis:int) | 设置每个`FileDownloadListener#progress`之间回调间隔(ms)
266270
| setTag(tag:Object) | 内部不会使用,在回调的时候用户自己使用
267271
| setTag(key:int, tag:Object) | 用于存储任意的变量方便回调中使用,以key作为索引
268272
| setForceReDownload(isForceReDownload:boolean) | 强制重新下载,将会忽略检测文件是否健在
@@ -279,6 +283,7 @@ if (parallel) {
279283
| getId(void):int | 获取唯一Id(内部通过url与path生成)
280284
| getUrl(void):String | 获取下载连接
281285
| getCallbackProgressTimes(void):int | 获得progress最大回调次数
286+
| getCallbackProgressMinInterval(void):int | 获得每个progress之间的回调间隔(ms)
282287
| getPath(void):String | 获取下载文件存储路径
283288
| getListener(void):FileDownloadListener | 获取监听器
284289
| getSoFarBytes(void):int | 获取已经下载的字节数

‎README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Android multi-task file download engine.
88

99
> [中文文档](https://github.com/lingochamp/FileDownloader/blob/master/README-zh.md)
1010
11-
> This project dependency on [square/okhttp 3.2.0](https://github.com/square/okhttp)
11+
> This project dependency on [square/okhttp 3.3.1](https://github.com/square/okhttp)
1212
1313
## DEMO
1414

@@ -26,7 +26,7 @@ FileDownloader is installed by adding the following dependency to your build.gra
2626

2727
```
2828
dependencies {
29-
compile 'com.liulishuo.filedownloader:library:0.3.1'
29+
compile 'com.liulishuo.filedownloader:library:0.3.2'
3030
}
3131
```
3232

‎gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
VERSION_NAME=0.3.1
2-
VERSION_CODE=22
1+
VERSION_NAME=0.3.2
2+
VERSION_CODE=23
33
BUILD_TOOLS_VERSION=23.0.1
44
COMPILE_SDK_VERSION=23
55

0 commit comments

Comments
 (0)
Failed to load comments.