This commit is contained in:
zhongchao
2022-02-25 21:35:53 +08:00
parent 197e9e6670
commit 7453c05573
2 changed files with 21 additions and 14 deletions

View File

@@ -3,6 +3,7 @@ package com.mogo.cloud.httpdns
import android.os.Handler import android.os.Handler
import android.os.HandlerThread import android.os.HandlerThread
import android.os.Message import android.os.Message
import android.text.TextUtils
import android.util.ArrayMap import android.util.ArrayMap
import com.mogo.cloud.httpdns.bean.HttpDnsSimpleLocation import com.mogo.cloud.httpdns.bean.HttpDnsSimpleLocation
import com.mogo.cloud.httpdns.listener.IMogoHttpDns import com.mogo.cloud.httpdns.listener.IMogoHttpDns
@@ -130,7 +131,13 @@ internal class HttpDnsHelper(private val builder: MogoHttpDnsConfig) : Handler.C
httpDnsCache?.let { httpDnsCache?.let {
val currentLoc = builder.getCurrentLocation()?.getCurrentLocation() val currentLoc = builder.getCurrentLocation()?.getCurrentLocation()
currentLoc?.let { cur -> currentLoc?.let { cur ->
if (it.cityCode.isNotEmpty() && cur.cityCode.isNotEmpty()) { if (it.cityCode.isNotEmpty()
&& cur.cityCode.isNotEmpty()
&& TextUtils.equals(
it.cityCode,
cur.cityCode
)
) {
getHttpDnsAddress(type, _host) getHttpDnsAddress(type, _host)
httpDnsCache = currentLoc httpDnsCache = currentLoc
} }

View File

@@ -33,29 +33,29 @@ SNAPSHOT_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-snapshots/
USERNAME=xintai USERNAME=xintai
PASSWORD=xintai2018 PASSWORD=xintai2018
# 编译模式: false - 依赖本地版本, true - 依赖 maven 版本 # 编译模式: false - 依赖本地版本, true - 依赖 maven 版本
RELEASE=false RELEASE=true
# AI CLOUD 云平台 # AI CLOUD 云平台
# 工具类 # 工具类
MOGO_UTILS_VERSION=1.3.23 MOGO_UTILS_VERSION=1.3.24
# 网络请求 # 网络请求
MOGO_NETWORK_VERSION=1.3.23 MOGO_NETWORK_VERSION=1.3.24
# 网络DNS # 网络DNS
MOGO_HTTPDNS_VERSION=1.3.23 MOGO_HTTPDNS_VERSION=1.3.24
# 鉴权 # 鉴权
MOGO_PASSPORT_VERSION=1.3.23 MOGO_PASSPORT_VERSION=1.3.24
# 常链接 # 常链接
MOGO_SOCKET_VERSION=1.3.23 MOGO_SOCKET_VERSION=1.3.24
# 数据采集 # 数据采集
MOGO_REALTIME_VERSION=1.3.23 MOGO_REALTIME_VERSION=1.3.24
# 探路,道路事件发布,获取 # 探路,道路事件发布,获取
MOGO_TANLU_VERSION=1.3.23 MOGO_TANLU_VERSION=1.3.24
# 直播推流 # 直播推流
MOGO_LIVE_VERSION=1.3.23 MOGO_LIVE_VERSION=1.3.24
# 直播拉流 # 直播拉流
MOGO_TRAFFICLIVE_VERSION=1.3.23 MOGO_TRAFFICLIVE_VERSION=1.3.24
# 定位服务 # 定位服务
MOGO_LOCATION_VERSION=1.3.23 MOGO_LOCATION_VERSION=1.3.24
# 远程通讯模块 # 远程通讯模块
MOGO_TELEMATIC_VERSION=1.3.23 MOGO_TELEMATIC_VERSION=1.3.24
# v2x # v2x
MOGO_V2X_VERSION=1.0.1 MOGO_V2X_VERSION=1.3.24