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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#Changelog

# 7.6.1
* 修复上传区域错误
* 更正打点日志字段

# 7.6.0
* 新增打点日志
* 解决CI问题
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ https://github.com/qiniudemo/qiniu-lab-android

| Qiniu SDK 版本 | 最低 Android版本 | 依赖库版本 |
|------------ |-----------------|------------------------|
| 7.6.0 | Android 5.0+ | okhttp 4+ |
| 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.3.x | Android 2.3+ | okhttp 3.11.0 |
Expand All @@ -24,7 +24,7 @@ https://github.com/qiniudemo/qiniu-lab-android
| 7.0.7 | Android 2.2+ | android-async-http 1.4.8 |

### 注意
* 推荐使用最新版:7.6.0,7.6.0使用okhttp4.2.2
* 推荐使用最新版:7.6.1,7.6.1使用okhttp4.2.2
* 7.4.3是在7.5.2版本上降低okhttp版本,其他功能不变
* 从 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 @@ -556,7 +556,7 @@ public static String resultCode(int statuscode) {

public static String errorType(int statuscode) {
String result = "";
if (200 < statuscode && statuscode < 400) {
if (200 < statuscode && statuscode < 600) {
return "response_error";
}
switch (statuscode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private void setTarget_region_id(ZoneInfo info) {
DnsPrefetcher.target_region_id = "z0";
} else if (info.upDomainsList.contains(FixedZone.arrayzone1[0])) {
DnsPrefetcher.target_region_id = "z1";
} else if (info.upDomainsList.contains(FixedZone.arrayzone1[0])) {
} else if (info.upDomainsList.contains(FixedZone.arrayzone2[0])) {
DnsPrefetcher.target_region_id = "z2";
} else if (info.upDomainsList.contains(FixedZone.arrayZoneAs0[0])) {
DnsPrefetcher.target_region_id = "as0";
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.0";
public static final String VERSION = "7.6.1";

public static final String UTF_8 = "utf-8";
}
9 changes: 6 additions & 3 deletions library/src/main/java/com/qiniu/android/common/FixedZone.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,18 @@ public final class FixedZone extends Zone {
};
public static final Zone zoneAs0 = new FixedZone(arrayZoneAs0);

private static ZoneInfo zoneInfo;
private static List<ZoneInfo> listZoneInfo = new ArrayList<ZoneInfo>();
private ZoneInfo zoneInfo;
private static ZoneInfo preCustomZone;

public static List<ZoneInfo> getZoneInfos() {
List<ZoneInfo> listZoneInfo = new ArrayList<ZoneInfo>();
listZoneInfo.add(createZoneInfo(arrayzone0));
listZoneInfo.add(createZoneInfo(arrayzone1));
listZoneInfo.add(createZoneInfo(arrayzone2));
listZoneInfo.add(createZoneInfo(arrayzoneNa0));
listZoneInfo.add(createZoneInfo(arrayZoneAs0));
listZoneInfo.add(zoneInfo);
if (preCustomZone != null)
listZoneInfo.add(preCustomZone);
return listZoneInfo;
}

Expand All @@ -84,6 +86,7 @@ public FixedZone(ZoneInfo zoneInfo) {

public FixedZone(String[] upDomains) {
this.zoneInfo = createZoneInfo(upDomains);
this.preCustomZone = this.zoneInfo;
}

public static ZoneInfo createZoneInfo(String[] upDomains) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ ZoneInfo preQueryIndex(DnsPrefetcher.ZoneIndex index) {
target_region_id = "z0";
} else if (info.upDomainsList.contains(FixedZone.arrayzone1[0])) {
target_region_id = "z1";
} else if (info.upDomainsList.contains(FixedZone.arrayzone1[0])) {
} else if (info.upDomainsList.contains(FixedZone.arrayzone2[0])) {
target_region_id = "z2";
} else if (info.upDomainsList.contains(FixedZone.arrayZoneAs0[0])) {
target_region_id = "as0";
Expand Down