1. 优化单位显示
2. 去掉部分log 3. 其他优化
This commit is contained in:
@@ -2,6 +2,7 @@ package com.mogo.launcher;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Process;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -27,6 +28,7 @@ import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.passport.IMogoTicketCallback;
|
||||
import com.mogo.test.crashreport.ITestCrashReportProvider;
|
||||
import com.mogo.utils.ProcessUtils;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.LogLevel;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -90,7 +92,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addBaseModule( new MogoModule( MogoServicePaths.PATH_MOGO_MONITOR, "MogoMonitor" ) );
|
||||
MogoModulePaths.addModule( new MogoModule( PushUIConstants.PATH, PushUIConstants.NAME ) );
|
||||
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GLOBAL_UNWAKE,"GlobalUnwake"));
|
||||
MogoModulePaths.addBaseModule( new MogoModule( MogoServicePaths.PATH_GLOBAL_UNWAKE, "GlobalUnwake" ) );
|
||||
|
||||
if ( !DebugConfig.isLauncher() ) {
|
||||
PersistentManager.getInstance().initManager( this );
|
||||
@@ -109,13 +111,11 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
|
||||
@Override
|
||||
protected boolean shouldInit() {
|
||||
return !LeakCanary.isInAnalyzerProcess( this );
|
||||
Logger.w( TAG, "evaluate shouldInit() with: %s", ProcessUtils.getProcessName( Process.myPid() ) );
|
||||
return ProcessUtils.isMainProcess( this );
|
||||
}
|
||||
|
||||
private void initDebugConfig() {
|
||||
if ( !shouldInit() ) {
|
||||
return;
|
||||
}
|
||||
DebugConfig.setNetMode( BuildConfig.NET_ENV );
|
||||
DebugConfig.setDebug( BuildConfig.DEBUG );
|
||||
DebugConfig.setLaunchLocationService( BuildConfig.LAUNCH_LOCATION_SERVICE );
|
||||
@@ -186,10 +186,12 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
|
||||
private void prepareSocketAndLocationServices( IMogoServiceApis apis ) {
|
||||
apis.getSocketManagerApi( getApplicationContext() ).init( getApplicationContext(), DebugConfig.getSocketAppId() );
|
||||
apis.getLocationInfoApi().start();
|
||||
apis.getMapServiceApi().getSingletonLocationClient( getApplicationContext() ).addLocationListener( location -> {
|
||||
apis.getLocationInfoApi().provideLocation( location );
|
||||
} );
|
||||
if ( DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE ) {
|
||||
apis.getLocationInfoApi().start();
|
||||
apis.getMapServiceApi().getSingletonLocationClient( getApplicationContext() ).addLocationListener( location -> {
|
||||
apis.getLocationInfoApi().provideLocation( location );
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user