Skip to content

Commit

Permalink
Support acc (#511)
Browse files Browse the repository at this point in the history
  • Loading branch information
YangSen-qn authored Jun 24, 2024
1 parent 37e573e commit 8a25c52
Show file tree
Hide file tree
Showing 28 changed files with 392 additions and 100 deletions.
1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ allprojects {
repositories {
jcenter()
google()
mavenCentral()
}
// gradle.projectsEvaluated {
// tasks.withType(JavaCompile) {
Expand Down
14 changes: 7 additions & 7 deletions library/src/androidTest/java/com/qiniu/android/TestConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ public final class TestConfig {
// TODO: 2020-05-09 bad token for testPutBytesWithFixedZoneUseBackupDomains
// 华东上传凭证
public static final String bucket_z0 = "kodo-phone-zone0-space";
public static final String token_z0 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:kCuN1lxE7wby0SgsYmgleVQh5pk=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZTAtc3BhY2UiLCJkZWFkbGluZSI6MTcwMjk1Mzg5MSwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0=";
public static final String token_z0 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:gHBZrJTOKxxJlXjYoUxWmRSvuU8=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZTAtc3BhY2UiLCJkZWFkbGluZSI6MTcyMTcwMDU5MiwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0=";
// 华北上传凭证
public static final String bucket_z1 = "kodo-phone-zone1-space";
public static final String token_z1 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:6GJohI_Ldf_hBwGATV3iYeuMVZ0=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZTEtc3BhY2UiLCJkZWFkbGluZSI6MTcwMjk1Mzg5MSwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0=";
public static final String token_z1 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:8kFB5kF7f3INNSUZLToOBDTGMbU=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZTEtc3BhY2UiLCJkZWFkbGluZSI6MTcyMTcwMDU5MiwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0=";
// 华南上传凭证
public static final String bucket_z2 = "kodo-phone-zone2-space";
public static final String token_z2 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:gy-wF5GQuoffNKUmRMKC0wVQDHQ=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZTItc3BhY2UiLCJkZWFkbGluZSI6MTcwMjk1Mzg5MSwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0=";
public static final String token_z2 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:CR7NjzaMWAqQAt6b7mPuwvwIzLs=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZTItc3BhY2UiLCJkZWFkbGluZSI6MTcyMTcwMDU5MiwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0=";
// 北美上传凭证
public static final String bucket_na0 = "kodo-phone-zone-na0-space";
public static final String token_na0 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:mEbYwqz9BbvKpjemh7arZA01SCY=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZS1uYTAtc3BhY2UiLCJkZWFkbGluZSI6MTcwMjk1Mzg5MSwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0=";
public static final String token_na0 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:4TBEbspih6VzaNbPYlrpRIkm7xU=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZS1uYTAtc3BhY2UiLCJkZWFkbGluZSI6MTcyMTcwMDU5MiwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0=";
// 东南亚上传凭证
public static final String bucket_as0 = "kodo-phone-zone-as0-space";
public static final String token_as0 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:b5V9b1I3FCrNYJ1aQznlcGvyKe0=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZS1hczAtc3BhY2UiLCJkZWFkbGluZSI6MTcwMjk1Mzg5MSwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0=";
public static final String token_as0 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:JczpyfXUYEan2qrimbu6GlOCADo=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZS1hczAtc3BhY2UiLCJkZWFkbGluZSI6MTcyMTcwMDU5MiwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0=";
// 华北浙江2上传凭证
public static final String bucket_cn_east_2 = "kodo-phone-cn-east-2";
public static final String token_cn_east_2 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:5wMZsrDWTJuYW-aYz6AsBJJhol4=:eyJzY29wZSI6ImtvZG8tcGhvbmUtY24tZWFzdC0yIiwiZGVhZGxpbmUiOjE3MDI5NTM4OTEsICJyZXR1cm5Cb2R5Ijoie1wiZm9vXCI6JCh4OmZvbyksIFwiYmFyXCI6JCh4OmJhciksIFwibWltZVR5cGVcIjokKG1pbWVUeXBlKSwgXCJoYXNoXCI6JChldGFnKSwgXCJrZXlcIjokKGtleSksIFwiZm5hbWVcIjokKGZuYW1lKSwgXCJmc2l6ZVwiOiQoZnNpemUpfSJ9";
public static final String invalidBucketToken = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:AF6tAFx4teQul_zEMXWzbN79_eI=:eyJzY29wZSI6InpvbmVfaW52YWxpZCIsImRlYWRsaW5lIjoxNzAyOTUzODkxLCAicmV0dXJuQm9keSI6IntcImZvb1wiOiQoeDpmb28pLCBcImJhclwiOiQoeDpiYXIpLCBcIm1pbWVUeXBlXCI6JChtaW1lVHlwZSksIFwiaGFzaFwiOiQoZXRhZyksIFwia2V5XCI6JChrZXkpLCBcImZuYW1lXCI6JChmbmFtZSksIFwiZnNpemVcIjokKGZzaXplKX0ifQ==";
public static final String token_cn_east_2 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:LWCzEeHkDWcYVBViMzZdJ4IaZ0U=:eyJzY29wZSI6ImtvZG8tcGhvbmUtY24tZWFzdC0yIiwiZGVhZGxpbmUiOjE3MjE3MDA1OTIsICJyZXR1cm5Cb2R5Ijoie1wiZm9vXCI6JCh4OmZvbyksIFwiYmFyXCI6JCh4OmJhciksIFwibWltZVR5cGVcIjokKG1pbWVUeXBlKSwgXCJoYXNoXCI6JChldGFnKSwgXCJrZXlcIjokKGtleSksIFwiZm5hbWVcIjokKGZuYW1lKSwgXCJmc2l6ZVwiOiQoZnNpemUpfSJ9";
public static final String invalidBucketToken = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:FLgR-iEqqbGw-2vCdA9m5X7nOTY=:eyJzY29wZSI6InpvbmVfaW52YWxpZCIsImRlYWRsaW5lIjoxNzIxNzAwNTkyLCAicmV0dXJuQm9keSI6IntcImZvb1wiOiQoeDpmb28pLCBcImJhclwiOiQoeDpiYXIpLCBcIm1pbWVUeXBlXCI6JChtaW1lVHlwZSksIFwiaGFzaFwiOiQoZXRhZyksIFwia2V5XCI6JChrZXkpLCBcImZuYW1lXCI6JChmbmFtZSksIFwiZnNpemVcIjokKGZzaXplKX0ifQ==";

// -----------
public static final String ak = "bjtWBQXrcxgo7HWwlC_bgHg81j352_GhgBGZPeOW";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void testPreFetch() {
FixedZone fixedZone = new FixedZone(new String[]{host});

final DnsPrefetcher dnsPrefetcher = DnsPrefetcher.getInstance();
dnsPrefetcher.checkAndPrefetchDnsIfNeed(fixedZone, UpToken.parse(TestConfig.token_z0));
dnsPrefetcher.checkAndPrefetchDnsIfNeed(null, fixedZone, UpToken.parse(TestConfig.token_z0));

wait(new WaitConditional() {
@Override
Expand Down Expand Up @@ -95,7 +95,7 @@ public void testMutiThreadPrefetch(){
new Thread(new Runnable() {
@Override
public void run() {
boolean isSuccess = DnsPrefetchTransaction.addDnsCheckAndPrefetchTransaction(zone, UpToken.parse(TestConfig.token_z0));
boolean isSuccess = DnsPrefetchTransaction.addDnsCheckAndPrefetchTransaction(null, zone, UpToken.parse(TestConfig.token_z0));
synchronized (this){
if (isSuccess){
param.successCount += 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void test_CheckAndPrefetch(){
@Override
public void run() {

boolean isSuccess = DnsPrefetchTransaction.addDnsCheckAndPrefetchTransaction(zone, UpToken.parse(TestConfig.token_z0));
boolean isSuccess = DnsPrefetchTransaction.addDnsCheckAndPrefetchTransaction(null, zone, UpToken.parse(TestConfig.token_z0));
synchronized (this) {
if (isSuccess) {
successCount += 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public class SystemDnsTest extends BaseTest {

@Test
public void testDnsLookup() {
SystemDns dns = new SystemDns(5);
SystemDns dns = new SystemDns(10);
try {
List<IDnsNetworkAddress> result = dns.lookup("upload.qiniup.com");
List<IDnsNetworkAddress> result = dns.lookup("uplog.qbox.me");
assertTrue("testDnsLookup fail:", result != null && result.size() > 0);
} catch (UnknownHostException e) {
e.printStackTrace();
Expand All @@ -32,7 +32,7 @@ public void testDnsTimeout() {
int timeout = 5;
SystemDns dns = new SystemDns(timeout);
try {
List<IDnsNetworkAddress> result = dns.lookup("a.a.a.cn");
List<IDnsNetworkAddress> result = dns.lookup("abc.mock.cn");
assertTrue("testDnsTimeout fail:", result == null || result.size() == 0);
} catch (UnknownHostException e) {
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void testGetOneServer(){
String type = Utils.getIpType(null, host);
FixedZone zone = new FixedZone(new String[]{host});

UploadDomainRegion region = new UploadDomainRegion();
UploadDomainRegion region = new UploadDomainRegion(null);
region.setupRegionData(zone.getZonesInfo(null).zonesInfo.get(0));

UploadServerFreezeManager.getInstance().freezeType(type, 100);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.qiniu.android.http.request.RequestTransaction;
import com.qiniu.android.storage.UpToken;
import com.qiniu.android.transaction.TransactionManager;
import com.qiniu.android.utils.AsyncRun;
import com.qiniu.android.utils.LogUtil;
import com.qiniu.android.utils.StringUtils;
import com.qiniu.android.utils.Utils;
Expand All @@ -24,7 +23,6 @@
import java.util.Date;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -254,7 +252,7 @@ private byte[] getLogData() {
randomAccessFile = new RandomAccessFile(recorderTempFile, "r");
ByteArrayOutputStream out = new ByteArrayOutputStream(fileSize);
int len = 0;
byte[] buff = new byte[fileSize];
byte[] buff = new byte[32*1024];
while ((len = randomAccessFile.read(buff)) >= 0) {
out.write(buff, 0, len);
}
Expand Down
73 changes: 55 additions & 18 deletions library/src/main/java/com/qiniu/android/common/AutoZone.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
import com.qiniu.android.http.dns.DnsPrefetchTransaction;
import com.qiniu.android.http.metrics.UploadRegionRequestMetrics;
import com.qiniu.android.http.request.RequestTransaction;
import com.qiniu.android.storage.Configuration;
import com.qiniu.android.storage.UpToken;
import com.qiniu.android.storage.UploadOptions;
import com.qiniu.android.utils.Cache;
import com.qiniu.android.utils.ListUtils;
import com.qiniu.android.utils.SingleFlight;
import com.qiniu.android.utils.UrlSafeBase64;

Expand All @@ -14,7 +17,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
Expand Down Expand Up @@ -111,11 +113,12 @@ private String[] getUcServerArray() {
}

@Override
@Deprecated
public ZonesInfo getZonesInfo(UpToken token) {
if (token == null) {
return null;
}
String cacheKey = makeCacheKey(token.index());
String cacheKey = makeCacheKey(null, token.index());
ZonesInfo zonesInfo = zonesInfoMap.get(cacheKey);
if (zonesInfo != null) {
try {
Expand All @@ -128,15 +131,35 @@ public ZonesInfo getZonesInfo(UpToken token) {

@Override
public void preQuery(final UpToken token, final QueryHandler completeHandler) {
query(null, token, new QueryHandlerV2() {
@Override
public void complete(ResponseInfo responseInfo, UploadRegionRequestMetrics metrics, ZonesInfo zonesInfo) {
if (completeHandler != null) {
int code = ResponseInfo.NetworkError;
if (responseInfo != null) {
if (responseInfo.isOK()) {
code = 0;
} else {
code = responseInfo.statusCode;
}
}
completeHandler.complete(code, responseInfo, metrics);
}
}
});
}

@Override
public void query(Configuration configuration, UpToken token, QueryHandlerV2 completeHandler) {
if (token == null || !token.isValid()) {
completeHandler.complete(-1, ResponseInfo.invalidToken("invalid token"), null);
completeHandler.complete(ResponseInfo.invalidToken("invalid token"), null, null);
return;
}

UploadRegionRequestMetrics localMetrics = new UploadRegionRequestMetrics(null);
localMetrics.start();

final String cacheKey = makeCacheKey(token.index());
final String cacheKey = makeCacheKey(configuration, token.index());

ZonesInfo zonesInfo = null;
Cache.Object object = zoneCache.cacheForKey(cacheKey);
Expand All @@ -147,7 +170,7 @@ public void preQuery(final UpToken token, final QueryHandler completeHandler) {
if (zonesInfo != null && zonesInfo.isValid()) {
localMetrics.end();
zonesInfoMap.put(cacheKey, zonesInfo);
completeHandler.complete(0, ResponseInfo.successResponse(), localMetrics);
completeHandler.complete(ResponseInfo.successResponse(), localMetrics, zonesInfo);
return;
}

Expand All @@ -159,7 +182,7 @@ public void preQuery(final UpToken token, final QueryHandler completeHandler) {
@Override
public void action(final com.qiniu.android.utils.SingleFlight.CompleteHandler<SingleFlightValue> completeHandler) throws Exception {

final RequestTransaction transaction = createUploadRequestTransaction(token);
final RequestTransaction transaction = createUploadRequestTransaction(configuration, token);
transaction.queryUploadHosts(true, new RequestTransaction.RequestCompleteHandler() {
@Override
public void complete(ResponseInfo responseInfo, UploadRegionRequestMetrics requestMetrics, JSONObject response) {
Expand All @@ -186,36 +209,47 @@ public void complete(SingleFlightValue singleFlightValue) {
if (zonesInfoP.isValid()) {
zoneCache.cache(cacheKey, zonesInfoP, true);
zonesInfoMap.put(cacheKey, zonesInfoP);
completeHandler.complete(0, responseInfo, requestMetrics);
completeHandler.complete(responseInfo, requestMetrics, zonesInfoP);
} else {
completeHandler.complete(ResponseInfo.ParseError, responseInfo, requestMetrics);
responseInfo = ResponseInfo.parseError("origin response:" + responseInfo);
completeHandler.complete(responseInfo, requestMetrics, null);
}
} else {
if (defaultZone != null) {
// 备用只能用一次
ZonesInfo defaultZoneZonesInfo = defaultZone.getZonesInfo(token);
zonesInfoMap.put(cacheKey, defaultZoneZonesInfo);
completeHandler.complete(0, responseInfo, requestMetrics);
String message = "origin response:" + responseInfo;
responseInfo = ResponseInfo.successResponse();
responseInfo.message = message;
completeHandler.complete(responseInfo, requestMetrics, defaultZoneZonesInfo);
} else if (finalZonesInfo != null) {
// 缓存有,但是失效也可使用
zonesInfoMap.put(cacheKey, finalZonesInfo);
completeHandler.complete(0, responseInfo, requestMetrics);
String message = "origin response:" + responseInfo;
responseInfo = ResponseInfo.successResponse();
responseInfo.message = message;
completeHandler.complete(responseInfo, requestMetrics, finalZonesInfo);
} else {
completeHandler.complete(ResponseInfo.NetworkError, responseInfo, requestMetrics);
completeHandler.complete(responseInfo, requestMetrics, null);
}
}
}
});

} catch (Exception e) {
/// 此处永远不会执行,回调只为占位
completeHandler.complete(ResponseInfo.NetworkError, ResponseInfo.localIOError(e.toString()), null);
completeHandler.complete(ResponseInfo.localIOError(e.toString()), null, null);
}
}

private String makeCacheKey(String akAndBucket) {
private String makeCacheKey(Configuration configuration, String akAndBucket) {
String key = akAndBucket;
if (configuration != null) {
key += akAndBucket + ":" + configuration.accelerateUploading;
}
List<String> ucHosts = getUcServerList();
if (ucHosts == null || ucHosts.isEmpty()) {
if (ListUtils.isEmpty(ucHosts)) {
return akAndBucket;
}

Expand All @@ -227,13 +261,16 @@ private String makeCacheKey(String akAndBucket) {
hosts.append(host).append(":");
}

return UrlSafeBase64.encodeToString(hosts + akAndBucket);
return UrlSafeBase64.encodeToString(hosts + key);
}

private RequestTransaction createUploadRequestTransaction(UpToken token) {
private RequestTransaction createUploadRequestTransaction(Configuration configuration, UpToken token) {
List<String> hosts = getUcServerList();

RequestTransaction transaction = new RequestTransaction(hosts, ZoneInfo.EmptyRegionId, token);
if (configuration == null) {
configuration = new Configuration.Builder().build();
}
RequestTransaction transaction = new RequestTransaction(configuration, UploadOptions.defaultOptions(),
hosts, ZoneInfo.EmptyRegionId, null, token);
transactions.add(transaction);
return transaction;
}
Expand Down
3 changes: 2 additions & 1 deletion library/src/main/java/com/qiniu/android/common/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public final class Config {
/**
* preQuery host
*/
@Deprecated
public static String preQueryHost03 = "api.qiniu.com";

/**
Expand All @@ -95,7 +96,7 @@ public final class Config {
* @return preQuery hosts
*/
public static String[] preQueryHosts() {
return new String[]{preQueryHost00, preQueryHost01, preQueryHost02, preQueryHost03};
return new String[]{preQueryHost00, preQueryHost01, preQueryHost02};
}

/**
Expand Down
Loading

0 comments on commit 8a25c52

Please sign in to comment.