Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* 应广大用户需求,升级到 okhttp4
* 修复文件空指针异常

# 7.4.6(同v7.6.4code,okhttp3.12.6)
# 7.4.3(同v7.5.0code,okhttp3.12.6)

# 7.4.2
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@ https://github.com/qiniudemo/qiniu-lab-android
|------------ |-----------------|------------------------|
| 7.6.x | Android 5.0+ | okhttp 4+ |
| 7.5.x | Android 5.0+ | okhttp 4+ |
| 7.4.3 | Android 2.3+ | okhttp 3.12.6 |
| 7.4.6 | Android 4.0+ | okhttp 3.12.6 |
| 7.3.x | Android 2.3+ | okhttp 3.11.0 |
| 7.2.x | Android 2.3+ | okhttp 3+ |
| 7.1.x | Android 2.3+ | okhttp 2.6+ |
| 7.0.8,7.0.9 | Android 2.2+ | android-async-http 1.4.9 |
| 7.0.7 | Android 2.2+ | android-async-http 1.4.8 |

### 注意
* 推荐使用最新版:7.6.3,7.6.3使用okhttp4.2.2
* 7.4.3是在7.5.2版本上降低okhttp版本,其他功能不变
* 推荐使用最新版:7.6.4,7.6.3使用okhttp4.2.2
* 7.4.6是在7.6.4版本上降低okhttp版本,其他功能不变,AndroidNetwork.getMobileDbm()可以获取手机信号强度,需要如下权限(API>=18时生效)
```
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
```
* 从 7.3.13 开始,不在强制依赖 `happy-dns-android`,默认不再提供 `httpDns`,可以调用 `Configuration.Builder#dns(com.qiniu.android.http.Dns)`方法设置外部 `Dns`,自定义 `Dns` 要求实现 `com.qiniu.android.http.Dns` 接口。
* 从7.5.0开始增加了DNS预取和缓存策略,减少dns解析错误
* 如果可以明确 区域 的话,最好指定固定区域,这样可以少一步网络请求,少一步出错的可能。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public static class ReqInfo {
private long tid;
//在AutoZone或者dnsprefetch之后,根据host得到区域,如果自定义域名且本次没有dns预取,字段将为空
private String target_region_id;
private String current_region_id;
private String error_type;
private String error_description;
private String up_type;
Expand Down Expand Up @@ -312,6 +313,13 @@ public long getRequest_elapsed_time() {
public void setPrefetched_ip_count(long prefetched_ip_count) {
this.prefetched_ip_count = prefetched_ip_count;
}
public void setCurrent_region_id(String current_region_id) {
this.current_region_id = current_region_id;
}

public String getCurrent_region_id() {
return current_region_id;
}
}

public static class BlockInfo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


public final class Constants {
public static final String VERSION = "7.6.3";
public static final String VERSION = "7.6.4";

public static final String UTF_8 = "utf-8";
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public static byte[] toByteArray(Object obj) {
} finally {
bos.close();
}
} catch (IOException ex) {
} catch (Exception ex) {
ex.printStackTrace();
}
return bytes;
Expand Down