httpdns singleton
This commit is contained in:
@@ -24,6 +24,7 @@ import com.mogo.httpdns.MogoHttpDnsHandler;
|
||||
import com.mogo.utils.ThreadPoolService;
|
||||
import com.mogo.utils.TipDrawable;
|
||||
import com.mogo.utils.TipToast;
|
||||
import com.mogo.utils.httpdns.HttpSimpleLocation;
|
||||
import com.mogo.utils.network.NetConfig;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
@@ -87,6 +88,7 @@ public abstract class AbsMogoApplication extends Application {
|
||||
}
|
||||
|
||||
private void syncInit() {
|
||||
MogoHttpDnsHandler.getHttpDnsApi().init(this, this::getCurrentLocation);
|
||||
TipToast.init( this, ( ( context, message, tipDrawable ) -> {
|
||||
if ( TextUtils.isEmpty( message ) ) {
|
||||
return null;
|
||||
@@ -100,6 +102,10 @@ public abstract class AbsMogoApplication extends Application {
|
||||
} ) );
|
||||
}
|
||||
|
||||
protected HttpSimpleLocation getCurrentLocation(){
|
||||
return null;
|
||||
}
|
||||
|
||||
private View generateToastView( Context context, String message, TipDrawable tipDrawable){
|
||||
View contentView;
|
||||
if(tipDrawable==null) {
|
||||
|
||||
Reference in New Issue
Block a user