Skip to content

Commit cf0db0e

Browse files
committed
Merge pull request #67 from qiniu/develop
Release 6.1.0
2 parents d3ae2d7 + bba03e7 commit cf0db0e

37 files changed

+2209
-1419
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ before_script:
1515
- ./ci/wait_for_emulator.sh
1616
- adb shell input keyevent 82 &
1717

18-
script: ./gradlew connectedInstrumentTest
18+
script: ./gradlew connectedInstrumentTest --info

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
## CHANGE LOG
22

3+
### v6.1.0
4+
2014-09-02 issue [#67](https://github.com/qiniu/android-sdk/pull/67)
5+
6+
- [#64] 1.中断上传;2.uri不能直接转换为File时,转换为InputStream处理; 3.重新分片上传,可设置断点记录;4.重构InputStreamAt,MultipartEntity,CallBack等;
7+
8+
39
### v6.0.5
410
2014-07-20 issue [#61](https://github.com/qiniu/android-sdk/pull/61)
511

res/layout/resumable.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<Button
3939
android:layout_width="wrap_content"
4040
android:layout_height="wrap_content"
41-
android:text="暂停"
41+
android:text="STOP"
4242
android:id="@+id/button2" android:layout_toLeftOf="@+id/button1" android:layout_alignTop="@+id/button1"/>
4343
<TextView
4444
android:layout_width="wrap_content"

src/com/qiniu/auth/Authorizer.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.qiniu.auth;
2+
3+
public class Authorizer {
4+
5+
private String uploadToken;
6+
7+
public String getUploadToken() {
8+
return uploadToken;
9+
}
10+
11+
public void setUploadToken(String uploadToken) {
12+
this.uploadToken = uploadToken;
13+
}
14+
15+
}

src/com/qiniu/auth/CallRet.java

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/com/qiniu/auth/Client.java

Lines changed: 0 additions & 174 deletions
This file was deleted.

src/com/qiniu/auth/JSONObjectRet.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/com/qiniu/conf/Conf.java

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,44 @@
11
package com.qiniu.conf;
22

3-
import java.util.Random;
4-
53
public class Conf {
6-
public static final String VERSION = "6.0.5";
4+
public static final String VERSION = "6.1.0";
75
public static String UP_HOST = "http://upload.qiniu.com";
86
public static String UP_HOST2 = "http://up.qiniu.com";
9-
10-
private static String id = genId();
11-
12-
public static String getUserAgent() {
13-
return "QiniuAndroid/" + VERSION + " (" + android.os.Build.VERSION.RELEASE + "; "
14-
+ android.os.Build.MODEL+ "; " + id +")";
15-
}
16-
17-
private static String genId(){
18-
Random r = new Random();
19-
int rnum = r.nextInt(999);
20-
return System.currentTimeMillis() + "" + rnum;
21-
}
7+
8+
public static final String CHARSET = "utf-8";
9+
10+
/**
11+
* HTTP连接超时的时间毫秒(ms)
12+
* Determines the timeout in milliseconds until a connection is established.
13+
* A timeout value of zero is interpreted as an infinite timeout.
14+
*
15+
* Please note this parameter can only be applied to connections that
16+
* are bound to a particular local address.
17+
*/
18+
public static int CONNECTION_TIMEOUT = 30 * 1000;
19+
20+
/**
21+
* 读取response超时的时间毫秒(ms)
22+
* Defines the socket timeout (<code>SO_TIMEOUT</code>) in milliseconds,
23+
* which is the timeout for waiting for data or, put differently,
24+
* a maximum period inactivity between two consecutive data packets).
25+
* A timeout value of zero is interpreted as an infinite timeout.
26+
* @see java.net.SocketOptions#SO_TIMEOUT
27+
*/
28+
public static int SO_TIMEOUT = 30 * 1000;
29+
30+
public static final int BLOCK_SIZE = 1024 * 1024 * 4;
31+
public static int CHUNK_SIZE = 1024 * 256;
32+
public static int FIRST_CHUNK = 1024 * 256;
33+
public static int ONCE_WRITE_SIZE = 1024 * 32;
34+
35+
public static int BLOCK_TRY_TIMES = 2;
36+
public static int CHUNK_TRY_TIMES = 3;
37+
38+
public static String USER_AGENT = null;
39+
40+
public static final int ERROR_CODE = 0;
41+
public static final int CANCEL_CODE = -1;
42+
public static String PROCESS_MSG = "upload alread in process or procssed or canceled.";
43+
2244
}

0 commit comments

Comments
 (0)