Skip to content

Commit 06a7f5e

Browse files
committed
Merge pull request #92 from longbai/upcdn-via
Upcdn via
2 parents 2e0836a + a159335 commit 06a7f5e

File tree

17 files changed

+198
-15
lines changed

17 files changed

+198
-15
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ android:
88
- tools
99

1010
# The BuildTools version used by your project
11-
- build-tools-21.0.1
11+
- build-tools-21.1.2
1212

1313
# The SDK version used to compile your project
1414
- android-21
@@ -28,5 +28,5 @@ before_script:
2828
- adb shell input keyevent 82 &
2929

3030
script:
31-
- ./gradlew build
32-
- ./gradlew connectedAndroidTest --info
31+
# - ./gradlew build
32+
- ./gradlew connectedAndroidTest --info

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
#Changelog
22

3+
## 7.0.2 (2015-01-22)
4+
5+
### 增加
6+
* 记录请求花费时间
7+
* 纪录节点日志,节点对应的IP
8+
* 添加详细注释
9+
* 支持代理
10+
* 重构,增加了默认参数
11+
* 升级构建脚本
12+
13+
### 修正
14+
* mimeType设置不正确的问题
15+
* 当参数出现空字符串时,上传失败
16+
* 出现5xx失败时,应回源站上传
17+
318
## 7.0.1 (2014-10-29)
419

520
### 增加

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
将realease 目录中的jar 复制到项目中去,此版本sdk依赖 http://loopj.com/android-async-http/ 1.4.6及以上版本
1212

1313
### 通过maven
14-
* 如果在Adroid Studio中使用,添加dependencies `compile 'com.qiniu:qiniu-android-sdk:7.0.1'` 或在项目中添加maven依赖
14+
* 如果在Adroid Studio中使用,添加dependencies `compile 'com.qiniu:qiniu-android-sdk:7.0.2'` 或在项目中添加maven依赖
1515
* 如果是eclipse, 也可以直接添加依赖来处理。
1616

1717
## 使用方法

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:1.0.0'
8+
classpath 'com.android.tools.build:gradle:1.0.1'
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files

library/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ int code = versionNameToCode(version)
2121

2222
android {
2323
compileSdkVersion 21
24-
buildToolsVersion '21.1.1'
24+
buildToolsVersion '21.1.2'
2525
defaultConfig {
2626
//applicationId "com.qiniu.android"
2727
minSdkVersion 8
@@ -32,8 +32,9 @@ android {
3232
}
3333

3434
dependencies {
35-
compile fileTree(include: ['*.jar'], dir: 'libs')
3635
compile 'com.loopj.android:android-async-http:1.4.6'
36+
// compile 'com.android.support:appcompat-v7:21.0.3'
37+
compile fileTree(include: ['*.jar'], dir: 'libs')
3738
}
3839

3940
task releaseJar(type: Copy, dependsOn: 'build') {
@@ -46,4 +47,4 @@ task releaseJar(type: Copy, dependsOn: 'build') {
4647
setProperty('VERSION_NAME', version)
4748
setProperty('VERSION_CODE', code)
4849

49-
//apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
50+
apply from: '../mvn_push.gradle'

library/library.iml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
8181
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
8282
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
83+
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
8384
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
8485
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
8586
</content>

library/src/main/java/com/qiniu/android/common/Config.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Created by bailong on 14/10/8.
55
*/
66
public final class Config {
7-
public static final String VERSION = "7.0.1";
7+
public static final String VERSION = "7.0.2";
88

99
/**
1010
* 默认上传服务器

library/src/main/java/com/qiniu/android/http/CompletionHandler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
public interface CompletionHandler {
99
/**
1010
* 用户自定义的处理对象必须实现的接口方法
11+
* @param info 响应的调试信息
12+
* @param response 响应的数据
1113
*/
1214
void complete(ResponseInfo info, JSONObject response);
1315
}

library/src/main/java/com/qiniu/android/http/ProgressHandler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
public interface ProgressHandler {
77
/**
88
* 用户自定义进度处理对象必须实现的接口方法
9+
* @param bytesWritten 已经写入字节
10+
* @param totalSize 总字节数
911
*/
1012
void onProgress(int bytesWritten, int totalSize);
1113
}

library/src/main/java/com/qiniu/android/http/ResponseHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ private static ResponseInfo buildResponseInfo(int statusCode, Header[] headers,
7373
xvia = h.getValue();
7474
} else if ("X-Px".equals(h.getName())){
7575
xvia = h.getValue();
76+
} else if ("Fw-Via".equals(h.getName())){
77+
xvia = h.getValue();
7678
}
7779
}
7880
}
@@ -153,7 +155,7 @@ public void onStart() {
153155

154156
/**
155157
* hack the method for dns in background before receive msg in main looper
156-
* @param msg
158+
* @param msg 发送的状态信息
157159
*/
158160
@Override
159161
protected void sendMessage(Message msg) {

0 commit comments

Comments
 (0)