diff --git a/CHANGELOG.md b/CHANGELOG.md
index 12345fe8..fbbb7b4d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,10 @@
#Changelog
+## 8.8.0(2024-06-24)
+* 增加
+ * 上传支持加速域名
+* 调整
+ * 查询区域移除备用域名:api.qiniu.com
+
## 8.7.0(2023-11-23)
* 调整:
* 自动获取的区域信息结果缓存增加磁盘缓存
diff --git a/README.md b/README.md
index 08a4f619..b8ce6d67 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,7 @@ https://github.com/qiniudemo/qiniu-lab-android
| Qiniu SDK 版本 | 最低 Android版本 | 依赖库版本 |
|--------------|-----------------|------------------------|
+| 8.8.x | Android 4.0+ | okhttp 4+ |
| 8.7.x | Android 4.0+ | okhttp 4+ |
| 8.6.x | Android 4.0+ | okhttp 4+ |
| 8.5.x | Android 4.0+ | okhttp 4+ |
@@ -36,7 +37,7 @@ https://github.com/qiniudemo/qiniu-lab-android
| 7.0.7 | Android 2.2+ | android-async-http 1.4.8 |
### 注意
-* 推荐使用最新版:8.7.0
+* 推荐使用最新版:8.8.0
* 7.6.2 ~ 8.3.2 AndroidNetwork.getMobileDbm()可以获取手机信号强度,需要如下权限(API>=18时生效)
```
@@ -55,10 +56,10 @@ https://github.com/qiniudemo/qiniu-lab-android
* Android Studio中添加dependencies 或者 在项目中添加maven依赖
```
// 1. 直接导入
-implementation 'com.qiniu:qiniu-android-sdk:8.7.+'
+implementation 'com.qiniu:qiniu-android-sdk:8.8.+'
// 2. 如果要修改okhttp依赖的版本,可采用以下方式(强烈建议使用七牛库依赖的okhttp版本)
-implementation ('com.qiniu:qiniu-android-sdk:8.7.+'){
+implementation ('com.qiniu:qiniu-android-sdk:8.8.+'){
exclude (group: 'com.squareup.okhttp3', module: 'okhttp')
}
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
diff --git a/library/src/main/java/com/qiniu/android/common/Constants.java b/library/src/main/java/com/qiniu/android/common/Constants.java
index 88977b8d..2cd70b32 100644
--- a/library/src/main/java/com/qiniu/android/common/Constants.java
+++ b/library/src/main/java/com/qiniu/android/common/Constants.java
@@ -9,7 +9,7 @@ public final class Constants {
/**
* SDK 版本号
*/
- public static final String VERSION = "8.7.0";
+ public static final String VERSION = "8.8.0";
/**
* UTF-8 编码
diff --git a/library/src/main/java/com/qiniu/android/common/FixedZone.java b/library/src/main/java/com/qiniu/android/common/FixedZone.java
index f7d11d6d..a1458ce7 100644
--- a/library/src/main/java/com/qiniu/android/common/FixedZone.java
+++ b/library/src/main/java/com/qiniu/android/common/FixedZone.java
@@ -178,6 +178,14 @@ private FixedZone(String[] upDomains, String[] oldUpDomains, String regionId) {
this.zonesInfo = createZonesInfo(upDomains, oldUpDomains, regionId);
}
+ /**
+ * 构造方法
+ *
+ * @param accUpDomains 加速域名
+ * @param upDomains 上传域名
+ * @param oldUpDomains 支持 SNI 的域名
+ * @param regionId 区域 ID
+ */
public FixedZone(String[] accUpDomains,String[] upDomains, String[] oldUpDomains, String regionId) {
this.zonesInfo = createZonesInfo(accUpDomains, upDomains, oldUpDomains, regionId);
}
diff --git a/library/src/main/java/com/qiniu/android/common/Zone.java b/library/src/main/java/com/qiniu/android/common/Zone.java
index adbe0a5a..fd779fae 100644
--- a/library/src/main/java/com/qiniu/android/common/Zone.java
+++ b/library/src/main/java/com/qiniu/android/common/Zone.java
@@ -65,6 +65,7 @@ public interface QueryHandlerV2 {
*
* @param responseInfo 查询响应
* @param metrics 查询指标
+ * @param zonesInfo 区域信息
*/
void complete(ResponseInfo responseInfo, UploadRegionRequestMetrics metrics, ZonesInfo zonesInfo);
}
diff --git a/library/src/main/java/com/qiniu/android/http/ResponseInfo.java b/library/src/main/java/com/qiniu/android/http/ResponseInfo.java
index b94f7448..5510d7c8 100644
--- a/library/src/main/java/com/qiniu/android/http/ResponseInfo.java
+++ b/library/src/main/java/com/qiniu/android/http/ResponseInfo.java
@@ -618,6 +618,11 @@ public boolean isCtxExpiredError() {
return statusCode == 701 || (statusCode == 612 && error != null && error.contains("no such uploadId"));
}
+ /**
+ * 是否是加速配置错误
+ *
+ * @return 是否是加速配置错误
+ */
public boolean isTransferAccelerationConfigureError() {
if (error == null) {
return false;
diff --git a/library/src/main/java/com/qiniu/android/utils/ListUtils.java b/library/src/main/java/com/qiniu/android/utils/ListUtils.java
index b7a50379..fba810dd 100644
--- a/library/src/main/java/com/qiniu/android/utils/ListUtils.java
+++ b/library/src/main/java/com/qiniu/android/utils/ListUtils.java
@@ -2,8 +2,18 @@
import java.util.List;
+/**
+ * List 工具类
+ */
public class ListUtils {
+ /**
+ * 判断 List 是否为空
+ *
+ * @param objects List
+ * @return 是否为空
+ * @param List 中的元素类型
+ */
public static boolean isEmpty(List objects) {
return objects == null || objects.isEmpty();
}
diff --git a/library/src/main/java/com/qiniu/android/utils/MapUtils.java b/library/src/main/java/com/qiniu/android/utils/MapUtils.java
index 5df8e9c3..cabb5ae8 100644
--- a/library/src/main/java/com/qiniu/android/utils/MapUtils.java
+++ b/library/src/main/java/com/qiniu/android/utils/MapUtils.java
@@ -2,7 +2,19 @@
import java.util.Map;
+/**
+ * Map 工具类
+ */
public class MapUtils {
+
+ /**
+ * 判断 Map 是否为空
+ *
+ * @param objects Map
+ * @return 是否为空
+ * @param key 类型
+ * @param value 类型
+ */
public static boolean isEmpty(Map objects) {
return objects == null || objects.isEmpty();
}