Commit c7958cce by konghaorui

修改三方SDK初始化时机

parent 8c95cdc8
...@@ -5,9 +5,11 @@ import android.app.Application ...@@ -5,9 +5,11 @@ import android.app.Application
import com.alibaba.android.arouter.launcher.ARouter import com.alibaba.android.arouter.launcher.ARouter
import com.lzy.imagepicker.ImagePicker import com.lzy.imagepicker.ImagePicker
import com.lzy.imagepicker.view.CropImageView import com.lzy.imagepicker.view.CropImageView
import com.ydl.devicesidlib.DeviceIDHelper
import com.ydl.ydlcommon.actions.imagepicker.YdlImageLoader import com.ydl.ydlcommon.actions.imagepicker.YdlImageLoader
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.data.http.UpLoadLogUtils import com.ydl.ydlcommon.data.http.UpLoadLogUtils
import com.ydl.ydlcommon.utils.AppProgressUtils
import com.ydl.ydlcommon.utils.BuryPointUtils import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.LogUtil import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
...@@ -27,7 +29,9 @@ object YdlRepository { ...@@ -27,7 +29,9 @@ object YdlRepository {
// 需要在主 module 的 application 的 onCreate 方法中调用此方法 // 需要在主 module 的 application 的 onCreate 方法中调用此方法
fun initApp(app: Application,isDebug:Boolean) { fun initApp(app: Application,isDebug:Boolean) {
//DeviceIDHelper.getInstance().init(app.applicationContext) if (AppProgressUtils.isMainProcess(app)){
DeviceIDHelper.getInstance().init(app.applicationContext)
}
LogHelper.getInstance().deleteExpireLogSync() LogHelper.getInstance().deleteExpireLogSync()
LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug
com.yidianling.common.tools.LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug com.yidianling.common.tools.LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug
......
...@@ -47,10 +47,9 @@ class AppDelegate(context: Context) : IAppLifecycles,IApp{ ...@@ -47,10 +47,9 @@ class AppDelegate(context: Context) : IAppLifecycles,IApp{
mGlobalConfig = initModuleConfig(application, mModules!!) mGlobalConfig = initModuleConfig(application, mModules!!)
mGlobalConfig!!.initEnv() mGlobalConfig!!.initEnv()
if (AppProgressUtils.isMainProcess(application)){ //初始化YDL第三方依赖
//初始化YDL第三方依赖 YdlRepository.initApp(application,mGlobalConfig?.appDebug?:false)
YdlRepository.initApp(application,mGlobalConfig?.appDebug?:false)
}
//执行 扩展的 App onCreate 逻辑 //执行 扩展的 App onCreate 逻辑
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment