Skip to content

Commit

Permalink
Merge pull request #61 from qiniu/develop
Browse files Browse the repository at this point in the history
Release 6.0.5
  • Loading branch information
longbai committed Jul 22, 2014
2 parents 02be4c4 + 4ebbbba commit d3ae2d7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## CHANGE LOG

### v6.0.5
2014-07-20 issue [#61](https://github.com/qiniu/android-sdk/pull/61)

- [#60] bug 成功返回时body 如果是null 会出错

### v6.0.4
2014-07-20 issue [#58](https://github.com/qiniu/android-sdk/pull/58)

Expand Down
1 change: 1 addition & 0 deletions src/com/qiniu/auth/JSONObjectRet.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public JSONObjectRet(){}
public void onSuccess(byte[] body) {
if (body == null) {
onSuccess(new JSONObject());
return;
}
try {
JSONObject obj = new JSONObject(new String(body));
Expand Down
15 changes: 13 additions & 2 deletions src/com/qiniu/conf/Conf.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
package com.qiniu.conf;

import java.util.Random;

public class Conf {
public static final String VERSION = "6.0.4";
public static final String VERSION = "6.0.5";
public static String UP_HOST = "http://upload.qiniu.com";
public static String UP_HOST2 = "http://up.qiniu.com";

private static String id = genId();

public static String getUserAgent() {
return "QiniuAndroid/" + VERSION + " (" + android.os.Build.VERSION.RELEASE + "; " + android.os.Build.MODEL+ ")";
return "QiniuAndroid/" + VERSION + " (" + android.os.Build.VERSION.RELEASE + "; "
+ android.os.Build.MODEL+ "; " + id +")";
}

private static String genId(){
Random r = new Random();
int rnum = r.nextInt(999);
return System.currentTimeMillis() + "" + rnum;
}
}
1 change: 1 addition & 0 deletions tests/src/com/qiniu/test/UploadTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ private void successCheck() throws JSONException{
Assert.assertTrue(success);
Assert.assertNotNull(resp.optString("hash"));
Assert.assertEquals(file.length(), resp.getLong("fsize"));
Assert.assertEquals(key, resp.getString("key"));
}

private File createFile(double fileSize, String suf) throws IOException {
Expand Down

0 comments on commit d3ae2d7

Please sign in to comment.