From 36bbe5cf352d8de076caf0980b874be62ef091eb Mon Sep 17 00:00:00 2001 From: tongchenfei Date: Fri, 25 Dec 2020 18:35:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E5=9B=9Etencent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/functions/httpdns.gradle | 28 +++++++++++++++---- .../com/mogo/httpdns/mogo/MogoHttpDns.java | 8 +++++- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/app/functions/httpdns.gradle b/app/functions/httpdns.gradle index 9edbf9b3f7..176938bc92 100644 --- a/app/functions/httpdns.gradle +++ b/app/functions/httpdns.gradle @@ -2,12 +2,28 @@ project.dependencies { if (Boolean.valueOf(RELEASE)) { - qaImplementation rootProject.ext.dependencies.httpdnsnoop - demoImplementation rootProject.ext.dependencies.httpdnsnoop - onlineImplementation rootProject.ext.dependencies.httpdnsmogo + bydautoImplementation rootProject.ext.dependencies.httpdnsnoop + d82xImplementation rootProject.ext.dependencies.httpdnsnoop + em1Implementation rootProject.ext.dependencies.httpdnsnoop + d8xxImplementation rootProject.ext.dependencies.httpdnsnoop + d80xImplementation rootProject.ext.dependencies.httpdnsnoop + em4Implementation rootProject.ext.dependencies.httpdnsnoop + e8xxImplementation rootProject.ext.dependencies.httpdnstencent + f8xxImplementation rootProject.ext.dependencies.httpdnstencent + f80xImplementation rootProject.ext.dependencies.httpdnstencent + f8AmapImplementation rootProject.ext.dependencies.httpdnstencent + em3Implementation rootProject.ext.dependencies.httpdnsnoop } else { - qaImplementation project(':foudations:httpdns-noop') - demoImplementation project(':foudations:httpdns-noop') - onlineImplementation project(':foudations:httpdns-mogo') + bydautoImplementation project(':foudations:httpdns-noop') + d82xImplementation project(':foudations:httpdns-noop') + em1Implementation project(':foudations:httpdns-noop') + d8xxImplementation project(':foudations:httpdns-noop') + d80xImplementation project(':foudations:httpdns-noop') + em4Implementation project(':foudations:httpdns-noop') + e8xxImplementation project(':foudations:httpdns-tencent') + f8xxImplementation project(':foudations:httpdns-tencent') + f80xImplementation project(':foudations:httpdns-tencent') + f8AmapImplementation project(':foudations:httpdns-tencent') + em3Implementation project(':foudations:httpdns-noop') } } \ No newline at end of file diff --git a/foudations/httpdns-mogo/src/main/java/com/mogo/httpdns/mogo/MogoHttpDns.java b/foudations/httpdns-mogo/src/main/java/com/mogo/httpdns/mogo/MogoHttpDns.java index e30d073420..e7b7ab75d9 100644 --- a/foudations/httpdns-mogo/src/main/java/com/mogo/httpdns/mogo/MogoHttpDns.java +++ b/foudations/httpdns-mogo/src/main/java/com/mogo/httpdns/mogo/MogoHttpDns.java @@ -18,6 +18,7 @@ import com.mogo.httpdnshelper.sdk.listener.IHttpDnsCurrentLocation; import com.mogo.httpdnshelper.sdk.listener.OnAddressChangedListener; import com.mogo.map.location.MogoLocation; import com.mogo.module.common.MogoApisHandler; +import com.mogo.utils.logger.Logger; import com.mogo.utils.network.HttpDns; import java.net.InetAddress; @@ -105,7 +106,12 @@ public class MogoHttpDns implements IMogoHttpDns, HttpDns, OnAddressChangedListe public void onAddressChanged(@org.jetbrains.annotations.Nullable Map map) { if (map != null) { for (String key : map.keySet()) { - ttlCallbackMap.get(key).onTtl(); + IHttpDnsTtlCallback callback = ttlCallbackMap.get(key); + if (callback != null) { + callback.onTtl(); + }else{ + Logger.d("MogoHttpDns", "callback is null: " + key); + } } } }