[Update]Bugly和APM初始化时间提前

This commit is contained in:
chenfufeng
2022-06-22 12:07:52 +08:00
parent ad3aef1644
commit bab63b4bfe
7 changed files with 63 additions and 24 deletions

View File

@@ -0,0 +1,29 @@
package com.mogo.launcher.stageone
import android.content.Context
import com.rousetime.android_startup.AndroidStartup
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.test.crashreport.upgrade.UpgradeReportConstants
import com.mogo.test.crashreport.CrashReportConstants
class APMStartup : AndroidStartup<Boolean?>() {
override fun create(context: Context): Boolean? {
// bugly
ARouter.getInstance().build(UpgradeReportConstants.PATH).navigation()
// apm
ARouter.getInstance().build(CrashReportConstants.PATH).navigation()
return true
}
override fun callCreateOnMainThread(): Boolean {
return true
}
override fun waitOnMainThread(): Boolean {
return false
}
override fun dependenciesByName(): List<String> {
return listOf("com.mogo.launcher.stageone.ARouterStartUp")
}
}

View File

@@ -62,7 +62,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
override fun waitOnMainThread() = false
override fun dependenciesByName(): List<String> {
return listOf("com.mogo.launcher.stageone.ARouterStartUp", "com.mogo.launcher.stageone.ConfigStartUp")
return listOf("com.mogo.launcher.stageone.APMStartup", "com.mogo.launcher.stageone.ConfigStartUp")
}
override fun create(context: Context): Boolean {