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

This commit is contained in:
chenfufeng
2022-06-22 12:07:52 +08:00
committed by liujing
parent 3ecce13f74
commit fff31003ec
7 changed files with 63 additions and 24 deletions

View File

@@ -5,8 +5,8 @@ import android.text.TextUtils;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.facade.template.IProvider;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import com.mogo.eagle.core.utilcode.util.AppUtils;
import com.mogo.test.crashreport.CrashReportConstants;
import com.tencent.bugly.Bugly;
@@ -38,7 +38,10 @@ public class UpgradeReportProvider implements IProvider {
String productFlavor = DebugConfig.getProductFlavor();
strategy.setAppChannel(productFlavor);
Bugly.init(context, CrashReportConstants.buglyAppID, true, strategy);
Bugly.putUserData(context, "serial", MoGoAiCloudClientConfig.getInstance().getSn());
String sn = SharedPrefsMgr.getInstance(context).getString("sn");
if (sn != null && !sn.isEmpty()) {
Bugly.putUserData(context, "serial", sn);
}
String mapSDKVersion = AppUtils.getCustomMapSDKVersion(context);
Bugly.putUserData(context, "MAP_SDK_VERSION", mapSDKVersion);
}