httpdns singleton

This commit is contained in:
tongchenfei
2021-01-05 14:02:48 +08:00
parent 61c380ff23
commit a121f3d2bd
9 changed files with 91 additions and 10 deletions

View File

@@ -0,0 +1,13 @@
package com.mogo.httpdns;
import android.location.Location;
import com.mogo.utils.httpdns.HttpSimpleLocation;
public interface IHttpDnsLocationChanged {
/**
* 获取当前定位
* @return 当前定位
*/
HttpSimpleLocation getLocation();
}

View File

@@ -1,5 +1,7 @@
package com.mogo.httpdns;
import android.content.Context;
import androidx.annotation.Keep;
import androidx.annotation.Nullable;
@@ -95,4 +97,12 @@ interface IMogoHttpDns extends IProvider {
*/
@Keep
void removeHttpDnsTtlCallback(String host,int type);
/**
* 初始化
*
* @param context 上下文
* @param locationChanged 定位发生变化
*/
void init(Context context, IHttpDnsLocationChanged locationChanged);
}