增加环境变量参数

This commit is contained in:
tongchenfei
2020-12-28 11:07:35 +08:00
parent e5ae856a8b
commit 51b4163000
2 changed files with 4 additions and 2 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.6'
implementation 'com.mogo.httpdns:httpdns-helper:1.0.7'
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.httpdnsbase

View File

@@ -1,12 +1,14 @@
package com.mogo.httpdns.mogo;
import android.content.Context;
import android.os.Debug;
import android.text.TextUtils;
import android.util.ArrayMap;
import androidx.annotation.Nullable;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.network.Utils;
import com.mogo.httpdns.HttpDnsConst;
import com.mogo.httpdns.IHttpDnsCallback;
@@ -74,7 +76,7 @@ public class MogoHttpDns implements IMogoHttpDns, HttpDns, OnAddressChangedListe
@Override
public void init(final Context context) {
httpDnsHelper = new HttpDnsHelper.Builder().setContext(context).setSn(Utils.getSn()).setShowDebugLog(true).setLoopCheckDelay(15 * 60 * 1000).setCurrentLocation(new IHttpDnsCurrentLocation() {
httpDnsHelper = new HttpDnsHelper.Builder().setContext(context).setEnv(DebugConfig.getNetMode()).setSn(Utils.getSn()).setShowDebugLog(true).setLoopCheckDelay(15 * 60 * 1000).setCurrentLocation(new IHttpDnsCurrentLocation() {
@org.jetbrains.annotations.Nullable
@Override
public HttpDnsSimpleLocation getCurrentLocation() {