[Update]Bugly和APM初始化时间提前
This commit is contained in:
29
app/src/main/java/com/mogo/launcher/stageone/APMStartup.kt
Normal file
29
app/src/main/java/com/mogo/launcher/stageone/APMStartup.kt
Normal 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")
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user