Skip to content

Commit

Permalink
version to v8.8.0 (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
YangSen-qn authored Jun 24, 2024
1 parent 8a25c52 commit 0b6ca58
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#Changelog
## 8.8.0(2024-06-24)
* 增加
* 上传支持加速域名
* 调整
* 查询区域移除备用域名:api.qiniu.com

## 8.7.0(2023-11-23)
* 调整:
* 自动获取的区域信息结果缓存增加磁盘缓存
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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+ |
Expand All @@ -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时生效)
```
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
Expand All @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 编码
Expand Down
8 changes: 8 additions & 0 deletions library/src/main/java/com/qiniu/android/common/FixedZone.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions library/src/main/java/com/qiniu/android/common/Zone.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public interface QueryHandlerV2 {
*
* @param responseInfo 查询响应
* @param metrics 查询指标
* @param zonesInfo 区域信息
*/
void complete(ResponseInfo responseInfo, UploadRegionRequestMetrics metrics, ZonesInfo zonesInfo);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions library/src/main/java/com/qiniu/android/utils/ListUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@

import java.util.List;

/**
* List 工具类
*/
public class ListUtils {

/**
* 判断 List 是否为空
*
* @param objects List
* @return 是否为空
* @param <T> List 中的元素类型
*/
public static <T> boolean isEmpty(List<T> objects) {
return objects == null || objects.isEmpty();
}
Expand Down
12 changes: 12 additions & 0 deletions library/src/main/java/com/qiniu/android/utils/MapUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@

import java.util.Map;

/**
* Map 工具类
*/
public class MapUtils {

/**
* 判断 Map 是否为空
*
* @param objects Map
* @return 是否为空
* @param <K> key 类型
* @param <V> value 类型
*/
public static <K,V> boolean isEmpty(Map<K,V> objects) {
return objects == null || objects.isEmpty();
}
Expand Down

0 comments on commit 0b6ca58

Please sign in to comment.