调整AppContext只在主线程中初始化

新增crashlytics的控制开关
This commit is contained in:
zlzw 2022-10-26 11:34:50 +08:00
parent dad3f85864
commit 22225eece6
2 changed files with 6 additions and 1 deletions

View File

@ -151,7 +151,9 @@
<meta-data <meta-data
android:name="IS_UPLOAD_ERROR_LOG" android:name="IS_UPLOAD_ERROR_LOG"
android:value="${isUploadLog}" /> android:value="${isUploadLog}" />
<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="${isUploadLog}" />
<meta-data <meta-data
android:name="com.openinstall.APP_KEY" android:name="com.openinstall.APP_KEY"
android:value="smvslm" /> android:value="smvslm" />

View File

@ -129,6 +129,9 @@ public class AppContext extends CommonAppContext {
public void onCreate() { public void onCreate() {
super.onCreate(); super.onCreate();
//注册全局异常捕获 //注册全局异常捕获
if(!isMainProcess()){
return;
}
registerError(); registerError();
registerFirebaseCrash(); registerFirebaseCrash();
sInstance = this; sInstance = this;