Skip to content

Commit

Permalink
change some doc
Browse files Browse the repository at this point in the history
  • Loading branch information
YangSen-qn committed Nov 29, 2023
1 parent 3340c3e commit 1e41eed
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void testQuick(){
@Test
public void testNormal(){
Config.normal();
assertTrue(Config.uploadThreshold == 4*1024);
assertTrue(Config.uploadThreshold == 16*1024);
assertTrue(Config.interval == 10);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public ReportItem() {
}

/**
* 天机记录内容
* 添加记录内容
*
* @param value 记录的内容
* @param key 记录的 key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public static ResponseInfo create(Request request,
}

/**
* 价差是否是异常请求
* 检查是否是异常请求
*
* @return ResponseInfo
*/
Expand Down
8 changes: 4 additions & 4 deletions library/src/main/java/com/qiniu/android/http/UserAgent.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ private UserAgent() {
}

/**
* UserAgent
* 获取 UserAgent 单例
*
* @return UserAgent
* @return UserAgent 单例
*/
public static UserAgent instance() {
return _instance;
Expand All @@ -55,10 +55,10 @@ static String getUserAgent(String id) {
}

/**
* UserAgent
* 获取 UserAgent 字符串
*
* @param part part
* @return UserAgent
* @return UserAgent 字符串
*/
public String getUa(String part) {
String _part = ("" + part).trim();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public String[] getDohIpv4Servers() {
}

/**
* 获取 Doh 方式进行 Dns 预解析使用的 Server
* 获取 Doh 方式进行 Dns 预解析使用的 IPv6 Server
*
* @return Server 列表
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public UploadManager(Recorder recorder) {
* 构造函数
*
* @param recorder 文件上传进度记录,可实现断点续传
* @param keyGen 上文件传进度记录的 key 生成器
* @param keyGen 上传文件上传进度对应记录缓存的 key 生成器
*/
public UploadManager(Recorder recorder, KeyGenerator keyGen) {
this(new Configuration.Builder().recorder(recorder, keyGen).build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public final class UploadOptions {
*
* @param params 参数
* @param mimeType mime type
* @param checkCrc 是否上传前后文件验证一致性
* @param checkCrc 是否验证文件上传前后的一致性
* @param progressHandler 进度回调
* @param cancellationSignal 取消函数
*/
Expand All @@ -70,7 +70,7 @@ public UploadOptions(Map<String, String> params,
*
* @param params 参数
* @param mimeType mime type
* @param checkCrc 是否上传前后文件验证一致性
* @param checkCrc 是否验证文件上传前后的一致性
* @param progressHandler 进度回调
* @param cancellationSignal 取消函数
* @param netReadyHandler 网络准备回调
Expand All @@ -90,7 +90,7 @@ public UploadOptions(final Map<String, String> params,
* @param params 参数
* @param metaDataParam meta data
* @param mimeType mime type
* @param checkCrc 是否上传前后文件验证一致性
* @param checkCrc 是否验证文件上传前后的一致性
* @param progressHandler 进度回调
* @param cancellationSignal 取消函数
* @param netReadyHandler 网络准备回调
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.qiniu.android.utils;

import android.Manifest;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.pm.PackageManager;
import android.net.ConnectivityManager;
Expand Down Expand Up @@ -163,6 +164,10 @@ private static String getNetWorkClass(Context context) {
case TelephonyManager.NETWORK_TYPE_LTE:
return Constants.NETWORK_CLASS_4_G;


case TelephonyManager.NETWORK_TYPE_NR:
return Constants.NETWORK_CLASS_5_G;

default:
return Constants.NETWORK_CLASS_UNKNOWN;
}
Expand Down
5 changes: 5 additions & 0 deletions library/src/main/java/com/qiniu/android/utils/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public class Constants {
*/
public static final String NETWORK_CLASS_4_G = "4g";

/**
* "5G" networks
*/
public static final String NETWORK_CLASS_5_G = "5g";

private Constants() {
}
}

0 comments on commit 1e41eed

Please sign in to comment.