Merge branch 'dev_arch_opt_3.0' into 'dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0'

Dev arch opt 3.0

See merge request zhjt/AndroidApp/MoGoEagleEye!729
This commit is contained in:
wangmingjun
2023-03-22 10:20:36 +00:00
10 changed files with 139 additions and 13 deletions

View File

@@ -1,9 +1,13 @@
package com.mogo.launcher;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.function.api.devatools.strict.IStrictModeProvider;
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
import com.mogo.eagle.core.function.call.startup.CallerStartUpManager;
import com.mogo.eagle.core.function.main.MainMoGoApplication;
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
import com.mogo.eagle.core.utilcode.util.SharedPrefs;
import com.mogo.launcher.crash.CrashSystem;
import com.mogo.launcher.startup.ARouterStartUp;
import com.mogo.launcher.startup.ConfigStartUp;
@@ -21,9 +25,21 @@ public class MogoApplication extends MainMoGoApplication {
ARouterStartUp.init(this);
ConfigStartUp.init(this);
CallerStartUpManager.initStageOne();
tryEnableStrictMode();
super.onCreate();
}
private void tryEnableStrictMode() {
IStrictModeProvider strict = CallerDevaToolsManager.INSTANCE.strict();
if (DebugConfig.isDebug() && strict != null) {
boolean enabled = SharedPrefs.getInstance(this).getBoolean("MOGO_STRICT_MODE_ENABLED", false);
Logger.e("StrictMode", "isEnabled:" + enabled);
if (enabled) {
strict.enable();
}
}
}
@Override
protected void initCrashConfig() {
CrashSystem crashSystem = CrashSystem.getInstance(this);