Skip to content

Commit fc29952

Browse files
committed
upgrade version code(7->8) name(0.1.4 -> 0.1.5)
1 parent 91c3a50 commit fc29952

File tree

5 files changed

+115
-25
lines changed

5 files changed

+115
-25
lines changed

CHANGELOG-ZH.md

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,34 @@
11
# Change log
22

3-
### Version 0.1.4
3+
## Version 0.1.5
4+
5+
_2016-01-17_
6+
7+
#### 新接口
8+
9+
- `BaseDownloadTask#setTag(key:int, tag:Object)`: 用于存储任意的变量方便回调中使用,以key作为索引。
10+
- `BaseDownloadTask#getTag(key:int)`: 根据key获取存储在task中的变量。
11+
- `BaseDownloadTask#addHeader(name:String, value:String)`: 添加自定义的请求头参数,需要注意的是内部为了断点续传,在判断断点续传有效时会自动添加上(`If-Match``Range`参数),请勿重复添加导致400或其他错误。
12+
- `BaseDownloadTask#addHeader(line:String)`: 添加自定义的请求头参数,需要注意的是内部为了断点续传,在判断断点续传有效时会自动添加上(`If-Match``Range`参数),请勿重复添加导致400或其他错误。
13+
- `BaseDownloadTask#removeAllHeaders(name:String)`: 删除由自定义添加上去请求参数为`{name}`的所有键对。
14+
15+
#### 性能与提高
16+
17+
- 提高性能: 在未打开Log的情况下,屏蔽了所有Log生成的代码。
18+
- 提高可调试性: 重新过滤所有的日志级别,减少高级别日志输出,并且默认将会打出`Warn``Error``Assert`级别的log以便于用户在未打开日志的情况下也可以定位到基本的组件异常。
19+
20+
#### 修复
21+
22+
- 修复在一些高并发的情况下,有可能内部队列存在残留任务的bug,此bug可能可能引发回调被旧的任务吞掉的问题。
23+
- 修复了出现网络错误,或者其他错误,重新下载无法自动断点续传的bug。
24+
25+
#### 其他
26+
27+
- 所依赖的okhttp从`2.7.1`升到`3.0.1`
28+
29+
## Version 0.1.4
30+
31+
_2016-01-13_
432

533
#### 新接口
634

@@ -22,33 +50,45 @@
2250
- 修复: 主动调用`FileDownloader#unBinderService`,没有释放连接相关资源的bug。
2351
- 修复: ui进程被干掉,下载进程健还有活跃的并行任务正在下载,ui进程启动以后启动相同的队列列表,无法收到进度只收到warn的bug。
2452

25-
### Version 0.1.3
53+
## Version 0.1.3
54+
55+
_2016-01-04_
2656

2757
- 不再受到1.99G限制;如果是大于1.99G的文件,请使用`FileDownloadLargeFileListener`作为监听器,使用对应的`getLargeFileSoFarBytes()``getLargeFileTotalBytes()`接口
2858
- 性能优化: 部分接口跨进程通信不受binder thread 阻塞。
29-
- 依赖okhttp,从2.7.0 升到2.7.1
59+
- 依赖okhttp,`2.7.0`升到`2.7.1`
3060

31-
### Version 0.1.2
61+
## Version 0.1.2
62+
63+
_2015-12-27_
3264

3365
- 优化线程消化能力
3466
- 修复大队列任务暂停可能部分无效的问题
3567
- 修复大队列并行下载时一定概率下载已经完成回调囤积延后回调的问题
3668

37-
### Version 0.1.1
69+
## Version 0.1.1
70+
71+
_2015-12-25_
3872

3973
- event线程区分敏捷线程池与其他线程池,减少资源冗余强制、内部稳定性以及消化能力与性能,
4074
- 添加自动重试接口,新增用户指定如果失败自动重试的次数
4175

42-
### Version 0.1.0
76+
## Version 0.1.0
77+
78+
_2015-12-24_
4379

4480
- FileDownloadStatus 由`int`改为`byte`,该参数会频繁的在IPC时被拷贝
4581
- 优化串行or并行任务时,筛选task在准备数据时就筛选好,减少冗余操作,更加安全
4682
- 优化串行任务执行保证使用更可靠的方式
4783

48-
### Version 0.0.9
84+
## Version 0.0.9
85+
86+
_2015-12-23_
4987

5088
- 将调用start(启动任务)抛独立线程处理,其中的线程是通过共享非下载进程EventPool中的线程池(可并行8个线程)
5189

52-
### Version 0.0.8
90+
## Version 0.0.8
91+
92+
_2015-12-22_
5393

5494
- initial release

CHANGELOG.md

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,35 @@
22

33
> [中文迭代日志](https://github.com/lingochamp/FileDownloader/blob/master/CHANGELOG-ZH.md)
44
5-
### Version 0.1.4
5+
## Version 0.1.5
6+
7+
_2016-01-17_
8+
9+
#### New Interfaces
10+
11+
- `BaseDownloadTask#setTag(key:int, tag:Object)`: Set a tag associated with this task. If the key already existed, the old tag will be replaced.
12+
- `BaseDownloadTask#getTag(key:int)`: Get the object stored in the task as a tag, or null if not set.
13+
- `BaseDownloadTask#addHeader(name:String, values:String)`: Add custom request header to the task. Attention: We have already handled ETag, and will add `If-Match` & `Range` value if it works.
14+
- `BaseDownloadTask#addHeader(line:String)`: Add custom request header to the task. Attention: We have already handled ETag, and will add `If-Match` & `Range` value if it works.
15+
- `BaseDownloadTask#removeAllHeaders(name:String)`: Remove all custom request header bind with the `{name}`.
16+
17+
#### Enhancement
18+
19+
- Improve Performance: Reduce the consumption of the generated log.
20+
- Improve Debugging: To filter all the log level, reduce the high level of log output, and by default, will output `Warn``Error``Assert` level of log in order to debugging in the case of the value of `FileDownloadLog.NEED_LOG` is false(default).
21+
22+
#### Fix
23+
24+
- Fix can't resume from the break point naturally in case of the download status of the task is Error.
25+
- Fix the size of the queue may not match the number of actual active tasks in case of high concurrency. This bug may would caused some callbacks to be consumed by the old tasks.
26+
27+
#### Others
28+
29+
- Upgrade dependency okhttp from `2.7.1` to `3.0.1`.
30+
31+
## Version 0.1.4
32+
33+
_2016-01-13_
634

735
#### New Interfaces
836

@@ -15,43 +43,55 @@
1543
- Supported [Chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding) data download(Recommend to glance at demo on [Single Task Test](https://github.com/lingochamp/FileDownloader/blob/master/demo/src/main/java/com/liulishuo/filedownloader/demo/SingleTaskTestActivity.java)).
1644
- Improve Performance: Reduce IPC.
1745
- Improve Performance: Reduce lock.
18-
- Improve Performance: Delete invalid datas in db with the `:filedownloader` progress start.
46+
- Improve Performance: Delete invalid datum in db with the `:filedownloader` progress start.
1947
- Improve Performance: Ignore the `callbackProgressTimes` column in db.
2048

2149
#### Fix
2250

2351
- Fix `FileDownloader#pauseAll` not effect in case of low memory and ui progress is Background Progress situation and the `:filedownloader` progress(Service Progress) alive and still have running tasks in the `filedownloader` progress but ui progress has died and relived.
2452
- Fix not release connect resources when invoke `FileDownloader#unBinderService` manually.
25-
- Handle case of ui progress be killed by sys and download progress not be killed, and ui progress relives and reexecutes same tasks queue.
53+
- Handle case of ui progress be killed by sys and download progress not be killed, and ui progress relives and re-executes same tasks queue.
54+
2655

56+
## Version 0.1.3
2757

28-
### Version 0.1.3
58+
_2016-01-04_
2959

3060
- Enhancement: no longer subject to the upper bound of 1.99G, add `FileDownloadLargeFileListener`, `getLargeFileSoFarBytes()`,`getLargeFileTotalBytes()`.
3161
- Performance optimization: some ipc transaction just need one-way call(async), not block(sync).
32-
- Upgrade dependency okhttp from 2.7.0 to 2.7.1.
62+
- Upgrade dependency okhttp from `2.7.0` to `2.7.1`.
3363

34-
### Version 0.1.2
64+
## Version 0.1.2
65+
66+
_2015-12-27_
3567

3668
- Optimize thread digestion([map](https://github.com/lingochamp/FileDownloader/raw/master/art/filedownload_sample_description.png).
3769
- Fix: may `pause()` invalid in large queue task.
3870
- Fix: large queue task parallel download, may download has been completed but the callback
3971

40-
### Version 0.1.1
72+
## Version 0.1.1
73+
74+
_2015-12-25_
4175

4276
- Optimization of internal performance, according to the time split thread pool.
4377
- Add auto retry feature.
4478

45-
### Version 0.1.0
79+
## Version 0.1.0
80+
81+
_2015-12-24_
4682

4783
- The `FileDownloadStatus` parameter type is changed from `int` to `byte`, which is frequently copied in IPC.
4884
- Optimization of multi task queue filtering time.
4985
- Optimizing serial task execution mechanism.
5086

51-
### Version 0.0.9
87+
## Version 0.0.9
88+
89+
_2015-12-23_
5290

5391
- The start operation into independent thread processing, sharing thread pool in EventPool.
5492

55-
### Version 0.0.8
93+
## Version 0.0.8
94+
95+
_2015-12-22_
5696

5797
- initial release

README-zh.md

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

88
> [README DOC](https://github.com/lingochamp/FileDownloader/blob/master/README.md)
99
10-
> 本引擎依赖okhttp 2.7.1
10+
> 本引擎依赖okhttp 3.0.1
1111
1212
---
1313
#### 版本迭代日志: [Change Log](https://github.com/lingochamp/FileDownloader/blob/master/CHANGELOG.md)
@@ -43,7 +43,7 @@ Android 文件下载引擎,稳定、高效、简单易用
4343
在项目中引用:
4444

4545
```
46-
compile 'com.liulishuo.filedownloader:library:0.1.4'
46+
compile 'com.liulishuo.filedownloader:library:0.1.5'
4747
```
4848

4949
#### 全局初始化在`Application.onCreate`
@@ -192,11 +192,15 @@ if(parallel){
192192
| --- | ---
193193
| setPath(path:String) | 下载文件的存储绝对路径
194194
| setListener(listener:FileDownloadListener) | 设置监听,可以以相同监听组成队列
195-
| setCallbackProgressTimes(times:int) | 设置progress最大回调次数
195+
| setCallbackProgressTimes(times:int) | 设置FileDownloadListener#progress最大回调次数
196196
| setTag(tag:Object) | 内部不会使用,在回调的时候用户自己使用
197+
| setTag(key:int, tag:Object) | 用于存储任意的变量方便回调中使用,以key作为索引
197198
| setForceReDownload(isForceReDownload:boolean) | 强制重新下载,将会忽略检测文件是否健在
198199
| setFinishListener(listener:FinishListener) | 结束监听,仅包含结束(over(void))的监听
199200
| setAutoRetryTimes(autoRetryTimes:int) | 当请求或下载或写文件过程中存在错误时,自动重试次数,默认为0次
201+
| addHeader(name:String, value:String) | 添加自定义的请求头参数,需要注意的是内部为了断点续传,在判断断点续传有效时会自动添加上(`If-Match``Range`参数),请勿重复添加导致400或其他错误
202+
| addHeader(line:String) | 添加自定义的请求头参数,需要注意的是内部为了断点续传,在判断断点续传有效时会自动添加上(`If-Match``Range`参数),请勿重复添加导致400或其他错误
203+
| removeAllHeaders(name:String) | 删除由自定义添加上去请求参数为`{name}`的所有键对
200204
| ready(void) | 用于队列下载的单任务的结束符(见上面:启动多任务下载的案例)
201205
| start(void) | 启动下载任务
202206
| pause(void) | 暂停下载任务(也可以理解为停止下载,但是在start的时候默认会断点续传)
@@ -212,6 +216,7 @@ if(parallel){
212216
| getEx(void):Throwable | 获取下载过程抛出的Throwable
213217
| isReusedOldFile(void):boolean | 判断是否是直接使用了旧文件(检测是有效文件),没有启动下载
214218
| getTag(void):Object | 获取用户setTag进来的Object
219+
| getTag(key:int):Object | 根据key获取存储在task中的变量
215220
| isContinue(void):boolean | 是否成功断点续传
216221
| getEtag(void):String | 获取当前下载获取到的ETag
217222
| getAutoRetryTimes(void):int | 自动重试次数

README.md

Lines changed: 7 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 2.7.1](https://github.com/square/okhttp)
11+
> This project dependency on [square/okhttp 3.0.1](https://github.com/square/okhttp)
1212
1313
## DEMO
1414

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

2525
```
2626
dependencies {
27-
compile 'com.liulishuo.filedownloader:library:0.1.4'
27+
compile 'com.liulishuo.filedownloader:library:0.1.5'
2828
}
2929
```
3030

@@ -190,9 +190,13 @@ if(parallel){
190190
| setListener(listener:FileDownloadListener) | For callback download status(pending,connected,progress,blockComplete,retry,error,paused,completed,warn)
191191
| setCallbackProgressTimes(times:int) | Set maximal callback times on callback `FileDownloadListener#progress`
192192
| setTag(tag:Object) | Sets the tag associated with this task, not be used by internal
193+
| setTag(key:int, tag:Object) | Sets a tag associated with this task. If the key already existed, the old tag will be replaced
193194
| setForceReDownload(isForceReDownload:boolean) | If set to true, will not check whether the file is downloaded by past, default false
194195
| setFinishListener(listener:FinishListener) | -
195196
| setAutoRetryTimes(autoRetryTimes:int) | Set the number of times to automatically retry when encounter any error, default 0
197+
| addHeader(name:String, values:String) | Add custom request header to the task. Attention: We have already handled ETag, and will add `If-Match` & `Range` value if it works
198+
| addHeader(line:String) | Add custom request header to the task. Attention: We have already handled ETag, and will add `If-Match` & `Range` value if it works
199+
| removeAllHeaders(name:String) | Remove all custom request header bind with the `{name}`
196200
| ready(void) | Ready task( For queue task )
197201
| start(void) | Start task
198202
| pause(void) | Pause task
@@ -208,6 +212,7 @@ if(parallel){
208212
| getEx(void):Throwable | Get throwable
209213
| isReusedOldFile(void):boolean | Is reused downloaded old file
210214
| getTag(void):Object | Get the task's tag
215+
| getTag(key:int):Object | Get the object stored in the task as a tag, or null if not set.
211216
| isContinue(void):boolean | Is resume by breakpoint
212217
| getEtag(void):String | Get current ETag on header
213218
| getAutoRetryTimes(void):int | Get the number of times to automatically retry

gradle.properties

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

0 commit comments

Comments
 (0)