Merge branch 'hotfix/v5.27.1-891/emulator_oaid_crash' into 'release'

fix: 修复模拟器上 OAID SDK 闪退的问题,在所有 postInit 操作前初始化 sentry

See merge request halo/android/assistant-android!1152
This commit is contained in:
陈君陶
2023-06-21 11:26:36 +08:00
3 changed files with 13 additions and 9 deletions

View File

@ -57,8 +57,7 @@ public class DataUtils {
return;
}
// 初始化 Sentry 约占用 90ms这里切换到子线程初始化
AppExecutor.getIoExecutor().execute(() -> initSentry(context, channel));
initSentry(context, channel);
}
private static void initSentry(Context context, String channel) {

View File

@ -289,6 +289,9 @@ public class HaloApp extends MultiDexApplication {
}
private void postInit(long delay) {
// 初始化 sentry
DataUtils.init(this, mChannel);
// 获取/更新 GID 和 读 SP 的操作不需要 delay
DataUtils.getGid();
@ -313,8 +316,6 @@ public class HaloApp extends MultiDexApplication {
MainWrapperRepository.Companion.getInstance().getHomeNavBar();
AppExecutor.getUiExecutor().executeWithDelay(() -> {
initThirdPartySdk();
FixedRateJobHelper.begin();
RegionSettingHelper.getRegionSetting();
@ -382,10 +383,6 @@ public class HaloApp extends MultiDexApplication {
});
}
private void initThirdPartySdk() {
DataUtils.init(this, mChannel);
}
private void initDataHelper() {
VideoRecordUtils.init(this, AppExecutor.getLogExecutor());
}