opt
This commit is contained in:
@@ -160,6 +160,11 @@ public class TopViewAnimHelper {
|
||||
|
||||
public void startTopInAnim(View view, ViewGroup.LayoutParams params,
|
||||
IMogoTopViewStatusListener statusListener) {
|
||||
|
||||
if ( topMotionLayout == null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.d(TAG, "startTopInAnim=====" + isTopViewOut);
|
||||
if (view == null) {
|
||||
throw new IllegalArgumentException("method addTopView params view is null");
|
||||
@@ -284,6 +289,11 @@ public class TopViewAnimHelper {
|
||||
}
|
||||
|
||||
public void startTopOutAnim(View view) {
|
||||
|
||||
if ( topMotionLayout == null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.d("TopViewAnimHelper", "startTopOutAnim=====");
|
||||
if (!isTopViewOut && viewCaches.contains(view)) {
|
||||
if (topContainer.getChildCount() > 1) {
|
||||
@@ -379,6 +389,11 @@ public class TopViewAnimHelper {
|
||||
}
|
||||
|
||||
public void showNaviView() {
|
||||
|
||||
if ( topMotionLayout == null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.d("TopViewAnimHelper", "showNaviView=====");
|
||||
setNaviVisibility(View.VISIBLE);
|
||||
int scene = 0;
|
||||
@@ -446,6 +461,11 @@ public class TopViewAnimHelper {
|
||||
}
|
||||
|
||||
public void hideNaviView() {
|
||||
|
||||
if ( topMotionLayout == null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.d("TopViewAnimHelper", "hideNaviView=====");
|
||||
setNaviVisibility(View.GONE);
|
||||
remainDistanceGroup.setVisibility(View.GONE);
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.mogo.service.map.IMogoMapService;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.autopilot.support.api.AutopilotServiceManage;
|
||||
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
|
||||
@@ -115,6 +116,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
mServiceApis = ( IMogoServiceApis ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICE_APIS ).navigation();
|
||||
}
|
||||
mMogoStatusManager = mServiceApis.getStatusManagerApi();
|
||||
AutopilotServiceManage.getInstance().init( getContext() );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -128,7 +130,6 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
mMogoMapService.getHostListenerRegister().registerHostNaviListener( EventDispatchCenter.getInstance() );
|
||||
mMogoMapService.getHostListenerRegister().registerHostAimlessModeListener( EventDispatchCenter.getInstance() );
|
||||
mMogoMapService.getHostListenerRegister().registerMarkerClickListener( this );
|
||||
mMogoMapService.getNavi( this ).registerCarLocationChangedListener( EventDispatchCenter.getInstance() );
|
||||
}
|
||||
|
||||
EventDispatchCenter.getInstance().setMapLoadedCallback( () -> {
|
||||
@@ -138,7 +139,6 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
loadContainerModules();
|
||||
MogoModulesManager.getInstance().loadModules();
|
||||
mPresenter.delayOperations();
|
||||
hideCoverUpLayout();
|
||||
|
||||
// 右移地图中心点
|
||||
mMogoMapUIController = mMogoMapService.getMapUIController();
|
||||
@@ -237,7 +237,8 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
if ( mMogoFragmentManager != null ) {
|
||||
if ( mMogoFragmentManager != null
|
||||
&& mMogoFragmentManager.getStackSize() > 0 ) {
|
||||
mMogoFragmentManager.pop();
|
||||
}
|
||||
}
|
||||
@@ -259,12 +260,10 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if ( MogoModulesManager.getInstance() != null ) {
|
||||
MogoModulesManager.getInstance().destroy();
|
||||
}
|
||||
mMogoMapService = null;
|
||||
mMogoMapUIController = null;
|
||||
mMogoFragmentManager = null;
|
||||
AutopilotServiceManage.getInstance().release();
|
||||
AIAssist.getInstance( this ).release();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,9 +59,4 @@ public interface MogoModulesHandler {
|
||||
* 2. mogo-module-service
|
||||
*/
|
||||
void loadBaseModule();
|
||||
|
||||
/**
|
||||
* 销毁
|
||||
*/
|
||||
void destroy();
|
||||
}
|
||||
|
||||
@@ -160,13 +160,4 @@ public class MogoModulesManager implements MogoModulesHandler {
|
||||
.add( containerId, fragment, provider.getModuleName() )
|
||||
.commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
mActivity = null;
|
||||
if ( mModuleProviders != null ) {
|
||||
mModuleProviders.clear();
|
||||
}
|
||||
mModuleProviders = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.mogo.module.main.cards.MogoModulesManager;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.roadcondition.service.MainService;
|
||||
|
||||
public
|
||||
/**
|
||||
@@ -49,6 +50,8 @@ class MogoMainService extends Service implements IMogoLocationListener {
|
||||
mServiceApis = ( IMogoServiceApis ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICE_APIS ).navigation();
|
||||
initAndStartLocation();
|
||||
loadBaseModules();
|
||||
startTanluService();
|
||||
initADAS();
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
@@ -57,6 +60,8 @@ class MogoMainService extends Service implements IMogoLocationListener {
|
||||
mLocationClient = mServiceApis.getMapServiceApi().getSingletonLocationClient( AbsMogoApplication.getApp() );
|
||||
mLocationClient.addLocationListener( this );
|
||||
mLocationClient.start( 2_000L );
|
||||
|
||||
mServiceApis.getMapServiceApi().getNavi( this ).registerCarLocationChangedListener( EventDispatchCenter.getInstance() );
|
||||
}
|
||||
|
||||
private void loadBaseModules() {
|
||||
@@ -64,6 +69,14 @@ class MogoMainService extends Service implements IMogoLocationListener {
|
||||
MogoModulesManager.getInstance().loadBaseModule();
|
||||
}
|
||||
|
||||
private void startTanluService(){
|
||||
MainService.Companion.launchService( getApplicationContext(), "0" );
|
||||
}
|
||||
|
||||
private void initADAS(){
|
||||
mServiceApis.getAdasControllerApi().init( AbsMogoApplication.getApp() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocationChanged( MogoLocation location ) {
|
||||
EventDispatchCenter.getInstance().onLocationChanged( location );
|
||||
|
||||
@@ -136,7 +136,7 @@ public class MapMarkerInfoView extends MapMarkerBaseView {
|
||||
ivIcon.setImageResource( R.drawable.icon_map_marker_living_light );
|
||||
break;
|
||||
default:
|
||||
ivIcon.setImageResource( R.drawable.icon_map_marker_shear_news );
|
||||
ivIcon.setImageResource( R.drawable.icon_map_marker_road_block_up2_light );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public class MapMarkerView extends MapMarkerBaseView {
|
||||
break;
|
||||
case MarkerPoiTypeEnum.FOURS_PARKING:
|
||||
default:
|
||||
ivIcon.setImageResource( R.drawable.icon_map_marker_shear_news );
|
||||
ivIcon.setImageResource( R.drawable.icon_map_marker_road_block_up2 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ dependencies {
|
||||
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.adasapi
|
||||
api rootProject.ext.dependencies.adasapi
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
api rootProject.ext.dependencies.mogomap
|
||||
implementation rootProject.ext.dependencies.mogomapapi
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
@@ -65,7 +66,7 @@ public class MogoADASController implements IMogoADASController {
|
||||
@Override
|
||||
public void showADAS() {
|
||||
|
||||
Logger.d( TAG, "show adas" );
|
||||
Logger.d( TAG, Log.getStackTraceString( new Throwable( ) ) );
|
||||
if ( !isProcessRunning( AbsMogoApplication.getApp(), getPackageUid( AbsMogoApplication.getApp(), "com.zhidiao.autopilot" ) ) ) {
|
||||
init( AbsMogoApplication.getApp() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user