Skip to content

Commit 0b6ca58

Browse files
authored
version to v8.8.0 (#512)
1 parent 8a25c52 commit 0b6ca58

File tree

8 files changed

+47
-4
lines changed

8 files changed

+47
-4
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#Changelog
2+
## 8.8.0(2024-06-24)
3+
* 增加
4+
* 上传支持加速域名
5+
* 调整
6+
* 查询区域移除备用域名:api.qiniu.com
7+
28
## 8.7.0(2023-11-23)
39
* 调整:
410
* 自动获取的区域信息结果缓存增加磁盘缓存

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ https://github.com/qiniudemo/qiniu-lab-android
1515

1616
| Qiniu SDK 版本 | 最低 Android版本 | 依赖库版本 |
1717
|--------------|-----------------|------------------------|
18+
| 8.8.x | Android 4.0+ | okhttp 4+ |
1819
| 8.7.x | Android 4.0+ | okhttp 4+ |
1920
| 8.6.x | Android 4.0+ | okhttp 4+ |
2021
| 8.5.x | Android 4.0+ | okhttp 4+ |
@@ -36,7 +37,7 @@ https://github.com/qiniudemo/qiniu-lab-android
3637
| 7.0.7 | Android 2.2+ | android-async-http 1.4.8 |
3738

3839
### 注意
39-
* 推荐使用最新版:8.7.0
40+
* 推荐使用最新版:8.8.0
4041
* 7.6.2 ~ 8.3.2 AndroidNetwork.getMobileDbm()可以获取手机信号强度,需要如下权限(API>=18时生效)
4142
```
4243
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
@@ -55,10 +56,10 @@ https://github.com/qiniudemo/qiniu-lab-android
5556
* Android Studio中添加dependencies 或者 在项目中添加maven依赖
5657
```
5758
// 1. 直接导入
58-
implementation 'com.qiniu:qiniu-android-sdk:8.7.+'
59+
implementation 'com.qiniu:qiniu-android-sdk:8.8.+'
5960
6061
// 2. 如果要修改okhttp依赖的版本,可采用以下方式(强烈建议使用七牛库依赖的okhttp版本)
61-
implementation ('com.qiniu:qiniu-android-sdk:8.7.+'){
62+
implementation ('com.qiniu:qiniu-android-sdk:8.8.+'){
6263
exclude (group: 'com.squareup.okhttp3', module: 'okhttp')
6364
}
6465
implementation 'com.squareup.okhttp3:okhttp:4.9.1'

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public final class Constants {
99
/**
1010
* SDK 版本号
1111
*/
12-
public static final String VERSION = "8.7.0";
12+
public static final String VERSION = "8.8.0";
1313

1414
/**
1515
* UTF-8 编码

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

+8
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,14 @@ private FixedZone(String[] upDomains, String[] oldUpDomains, String regionId) {
178178
this.zonesInfo = createZonesInfo(upDomains, oldUpDomains, regionId);
179179
}
180180

181+
/**
182+
* 构造方法
183+
*
184+
* @param accUpDomains 加速域名
185+
* @param upDomains 上传域名
186+
* @param oldUpDomains 支持 SNI 的域名
187+
* @param regionId 区域 ID
188+
*/
181189
public FixedZone(String[] accUpDomains,String[] upDomains, String[] oldUpDomains, String regionId) {
182190
this.zonesInfo = createZonesInfo(accUpDomains, upDomains, oldUpDomains, regionId);
183191
}

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

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public interface QueryHandlerV2 {
6565
*
6666
* @param responseInfo 查询响应
6767
* @param metrics 查询指标
68+
* @param zonesInfo 区域信息
6869
*/
6970
void complete(ResponseInfo responseInfo, UploadRegionRequestMetrics metrics, ZonesInfo zonesInfo);
7071
}

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

+5
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,11 @@ public boolean isCtxExpiredError() {
618618
return statusCode == 701 || (statusCode == 612 && error != null && error.contains("no such uploadId"));
619619
}
620620

621+
/**
622+
* 是否是加速配置错误
623+
*
624+
* @return 是否是加速配置错误
625+
*/
621626
public boolean isTransferAccelerationConfigureError() {
622627
if (error == null) {
623628
return false;

library/src/main/java/com/qiniu/android/utils/ListUtils.java

+10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22

33
import java.util.List;
44

5+
/**
6+
* List 工具类
7+
*/
58
public class ListUtils {
69

10+
/**
11+
* 判断 List 是否为空
12+
*
13+
* @param objects List
14+
* @return 是否为空
15+
* @param <T> List 中的元素类型
16+
*/
717
public static <T> boolean isEmpty(List<T> objects) {
818
return objects == null || objects.isEmpty();
919
}

library/src/main/java/com/qiniu/android/utils/MapUtils.java

+12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,19 @@
22

33
import java.util.Map;
44

5+
/**
6+
* Map 工具类
7+
*/
58
public class MapUtils {
9+
10+
/**
11+
* 判断 Map 是否为空
12+
*
13+
* @param objects Map
14+
* @return 是否为空
15+
* @param <K> key 类型
16+
* @param <V> value 类型
17+
*/
618
public static <K,V> boolean isEmpty(Map<K,V> objects) {
719
return objects == null || objects.isEmpty();
820
}

0 commit comments

Comments
 (0)