[Fix]
修复因为工控机数据通道过早建立连接导致渲染崩溃问题 Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -18,7 +18,6 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.context.ContextHolderUtil;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.BaseFragment;
|
||||
@@ -221,13 +220,11 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
|
||||
MogoModulesManager.getInstance().init(this);
|
||||
|
||||
if (DebugConfig.isMapBased()) {
|
||||
if (mServiceApis.getMapServiceApi() != null) {
|
||||
mServiceApis.getMapServiceApi().getHostListenerRegister().registerHostMapListener(EventDispatchCenter.getInstance());
|
||||
mServiceApis.getMapServiceApi().getHostListenerRegister().registerHostNaviListener(EventDispatchCenter.getInstance());
|
||||
mServiceApis.getMapServiceApi().getHostListenerRegister().registerHostAimlessModeListener(EventDispatchCenter.getInstance());
|
||||
mServiceApis.getMapServiceApi().getHostListenerRegister().registerMarkerClickListener(EventDispatchCenter.getInstance());
|
||||
}
|
||||
if (mServiceApis.getMapServiceApi() != null) {
|
||||
mServiceApis.getMapServiceApi().getHostListenerRegister().registerHostMapListener(EventDispatchCenter.getInstance());
|
||||
mServiceApis.getMapServiceApi().getHostListenerRegister().registerHostNaviListener(EventDispatchCenter.getInstance());
|
||||
mServiceApis.getMapServiceApi().getHostListenerRegister().registerHostAimlessModeListener(EventDispatchCenter.getInstance());
|
||||
mServiceApis.getMapServiceApi().getHostListenerRegister().registerMarkerClickListener(EventDispatchCenter.getInstance());
|
||||
}
|
||||
|
||||
initAdasControlStatusListener();
|
||||
@@ -242,11 +239,11 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
@Override
|
||||
public void run() {
|
||||
loadOthersModules();
|
||||
loadFunctionFragment();
|
||||
}
|
||||
}, 1000);
|
||||
Log.i(TAG, "App launch timer cost " + (System.currentTimeMillis() - start) + "ms");
|
||||
});
|
||||
loadFunctionFragment();
|
||||
loadFunctionMapView();
|
||||
} else {
|
||||
loadOthersModules();
|
||||
|
||||
@@ -8,6 +8,7 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.location.IMogoLocationListener;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
@@ -44,10 +45,12 @@ class MogoMainService extends Service implements IMogoLocationListener {
|
||||
mServiceApis = MogoApisHandler.getInstance().getApis();
|
||||
initAndStartLocation();
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
Logger.d(TAG, "4秒已过,启动基础服务……");
|
||||
loadBaseModules();
|
||||
startTanluService();
|
||||
initADAS();
|
||||
initGpsSimulatorListener();
|
||||
HdMapBuildConfig.isMapLoaded = true;
|
||||
}, 4_000L
|
||||
);
|
||||
// 开启延时检测
|
||||
|
||||
Reference in New Issue
Block a user