优化没有获取到路由表情况下httpdns返回值

This commit is contained in:
tongchenfei
2021-01-05 17:58:30 +08:00
parent a121f3d2bd
commit aa95ab8f87
3 changed files with 4 additions and 4 deletions

View File

@@ -32,7 +32,7 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation rootProject.ext.dependencies.arouter
annotationProcessor rootProject.ext.dependencies.aroutercompiler
implementation 'com.mogo.httpdns:httpdns-helper:1.0.15'
implementation 'com.mogo.httpdns:httpdns-helper:1.0.16'
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.httpdnsbase

View File

@@ -87,13 +87,13 @@ public class MogoHttpDns implements IMogoHttpDns, HttpDns, OnAddressChangedListe
@Override
public void init(Context context, final IHttpDnsLocationChanged locationChanged) {
httpDnsHelper = new HttpDnsHelper.Builder().setContext(context).setEnv(DebugConfig.getNetMode()).setSn(Utils.getSn()).setShowDebugLog(true).setLoopCheckDelay(15 * 60 * 1000).setCurrentLocation(new IHttpDnsCurrentLocation() {
httpDnsHelper = new HttpDnsHelper.Builder().setContext(context).setEnv(DebugConfig.getNetMode()).setDefaultUrl("dzt.zhidaozhixing.com").setSn(Utils.getSn()).setShowDebugLog(true).setLoopCheckDelay(15 * 60 * 1000).setCurrentLocation(new IHttpDnsCurrentLocation() {
@org.jetbrains.annotations.Nullable
@Override
public HttpDnsSimpleLocation getCurrentLocation() {
HttpSimpleLocation simpleLocation = locationChanged.getLocation();
if (simpleLocation != null) {
return new HttpDnsSimpleLocation("0734", simpleLocation.getLat(), simpleLocation.getLon());
return new HttpDnsSimpleLocation(simpleLocation.getCityCode(), simpleLocation.getLat(), simpleLocation.getLon());
}
return null;
}

View File

@@ -139,7 +139,7 @@ HTTPDNS_NOOP_VERSION = 2.0.12
######## 外部依赖引用
# 车聊聊
CARCHATTING_VERSION=2.2.63
CARCHATTING_VERSION=2.2.65
# 车聊聊接口
CARCHATTINGPROVIDER_VERSION=1.1.8
# websocket