opt
This commit is contained in:
@@ -13,6 +13,7 @@ import com.mogo.commons.network.Constants;
|
||||
import com.mogo.commons.network.ParamsUtil;
|
||||
import com.mogo.commons.network.X509TrustManagerImpl;
|
||||
import com.mogo.commons.storage.SpStorage;
|
||||
import com.mogo.utils.ThreadPoolService;
|
||||
import com.mogo.utils.TipToast;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.NetConfig;
|
||||
@@ -56,7 +57,11 @@ public class AbsMogoApplication extends Application {
|
||||
}
|
||||
|
||||
protected void init() {
|
||||
syncInit();
|
||||
asyncInit();
|
||||
}
|
||||
|
||||
private void syncInit(){
|
||||
// 初始化埋点
|
||||
Analytics.getInstance().start( sApp );
|
||||
Analytics.getInstance().setAppKey( "6bbe7e0e1ecd8e2f8dc336e1678a2791" );
|
||||
@@ -72,9 +77,6 @@ public class AbsMogoApplication extends Application {
|
||||
}
|
||||
ARouter.init( sApp );
|
||||
|
||||
// 初始化toast
|
||||
TipToast.init( sApp, null );
|
||||
|
||||
initNetConfig();
|
||||
initAccountSdk();
|
||||
}
|
||||
@@ -117,6 +119,14 @@ public class AbsMogoApplication extends Application {
|
||||
return sc;
|
||||
}
|
||||
|
||||
private void asyncInit(){
|
||||
ThreadPoolService.execute( ()->{
|
||||
initAccountSdk();
|
||||
// 初始化toast
|
||||
TipToast.init( sApp, null );
|
||||
} );
|
||||
}
|
||||
|
||||
private static void initAccountSdk() {
|
||||
AccountClientManager.init( sApp, DebugConfig.getNetMode(), NetEnvironManager.OS_2C, "os2.0-launcher" );
|
||||
AccountClientManager.getTicket( new TicketInfoCallback() {
|
||||
|
||||
Reference in New Issue
Block a user