opt
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -53,28 +53,38 @@ android {
|
||||
targetCompatibility 1.8
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'src/independent/AndroidManifest.xml'
|
||||
}
|
||||
launcher {
|
||||
manifest.srcFile 'src/launcher/AndroidManifest.xml'
|
||||
}
|
||||
independent {
|
||||
manifest.srcFile 'src/independent/AndroidManifest.xml'
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "product", "basic", "env"
|
||||
|
||||
productFlavors {
|
||||
//独立app
|
||||
independent{
|
||||
dimension "basic"
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'src/independent/AndroidManifest.xml'
|
||||
}
|
||||
}
|
||||
applicationId rootProject.ext.android.applicationId
|
||||
// 是否启动位置服务
|
||||
buildConfigField 'boolean', 'LAUNCH_LOCATION_SERVICE', 'false'
|
||||
// 是否使用自定义导航
|
||||
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
|
||||
}
|
||||
// launcher app
|
||||
launcher{
|
||||
dimension "basic"
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'src/launcher/AndroidManifest.xml'
|
||||
}
|
||||
}
|
||||
applicationId rootProject.ext.android.zhidadoApplicationId
|
||||
// 是否启动位置服务
|
||||
buildConfigField 'boolean', 'LAUNCH_LOCATION_SERVICE', 'true'
|
||||
// 是否使用自定义导航
|
||||
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
|
||||
}
|
||||
// f系列-分体机全系列,未细分
|
||||
f8xx{
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.auto.zhidao.logsdk.CrashSystem;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.adcard.AdCardConstants;
|
||||
import com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant;
|
||||
import com.mogo.module.back.BackToLauncherConst;
|
||||
import com.mogo.module.carchatting.card.CallChatConstant;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
@@ -24,9 +25,6 @@ import com.mogo.service.connection.IMogoSocketManager;
|
||||
import com.mogo.utils.logger.LogLevel;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import static com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant.PATH_AGREEMENT_FRAGMENT;
|
||||
import static com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant.PATH_AGREEMENT_MODULE_NAME;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-18
|
||||
@@ -35,6 +33,8 @@ import static com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant.PA
|
||||
*/
|
||||
public class MogoApplication extends AbsMogoApplication {
|
||||
|
||||
private static final String TAG = "MogoApplication";
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
DebugConfig.setNetMode(BuildConfig.NET_ENV);
|
||||
@@ -49,7 +49,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
Logger.init(BuildConfig.DEBUG ? LogLevel.DEBUG : LogLevel.OFF);
|
||||
|
||||
// MogoModulePaths.addModule(new MogoModule(PATH_GUIDE_FRAGMENT, PATH_GUIDE_MODULE_NAME));
|
||||
MogoModulePaths.addModule(new MogoModule(PATH_AGREEMENT_FRAGMENT, PATH_AGREEMENT_MODULE_NAME));
|
||||
MogoModulePaths.addModule(new MogoModule( AuthorizeConstant.PATH_AGREEMENT_FRAGMENT, AuthorizeConstant.PATH_AGREEMENT_MODULE_NAME));
|
||||
|
||||
//运营位卡片,需要默认显示,放在第一个加载
|
||||
MogoModulePaths.addModule(new MogoModule(AdCardConstants.TAG, AdCardConstants.MODULE_NAME));
|
||||
@@ -62,13 +62,20 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addModule(new MogoModule(PushUIConstants.TAG, PushUIConstants.TAG));
|
||||
MogoModulePaths.addModule(new MogoModule(BackToLauncherConst.MODULE_PATH, BackToLauncherConst.MODULE_NAME));
|
||||
Log.i("timer", "cost " + (System.currentTimeMillis() - start) + "ms");
|
||||
|
||||
DebugConfig.setLaunchLocationService( BuildConfig.LAUNCH_LOCATION_SERVICE );
|
||||
DebugConfig.setLaunchLocationService( BuildConfig.USE_CUSTOM_NAVI );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
super.init();
|
||||
IMogoSocketManager mMogoSocketManager = (IMogoSocketManager) ARouter.getInstance().build(MogoServicePaths.PATH_SOCKET_MANAGER).navigation();
|
||||
mMogoSocketManager.init(getApplicationContext(), BuildConfig.APPLICATION_ID);
|
||||
IMogoSocketManager mMogoSocketManager = ARouter.getInstance().navigation( IMogoSocketManager.class );
|
||||
if ( mMogoSocketManager != null ) {
|
||||
mMogoSocketManager.init(getApplicationContext(), BuildConfig.APPLICATION_ID);
|
||||
} else {
|
||||
Logger.e( TAG, "init socket server error." );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -75,7 +75,7 @@ public class DebugConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否拉起位置服务
|
||||
* 是否拉起位置服务,launcher 需要拉起位置服务,独立 app 不需要
|
||||
*/
|
||||
private static boolean sLaunchLocationService = true;
|
||||
|
||||
@@ -86,4 +86,17 @@ public class DebugConfig {
|
||||
public static void setLaunchLocationService( boolean launchLocationService ) {
|
||||
DebugConfig.sLaunchLocationService = launchLocationService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否使用自定义导航
|
||||
*/
|
||||
private static boolean sUseCustomNavi = false;
|
||||
|
||||
public static boolean isUseCustomNavi() {
|
||||
return sUseCustomNavi;
|
||||
}
|
||||
|
||||
public static void setUseCustomNavi( boolean sUseCustomNavi ) {
|
||||
DebugConfig.sUseCustomNavi = sUseCustomNavi;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,6 +80,6 @@ MOGO_MODULE_AD_CARD_VERSION=1.0.1
|
||||
|
||||
## 产品库必备配置
|
||||
applicationId=com.mogo.launcer
|
||||
applicationName=Launcer2.0
|
||||
applicationName=IntelligentPilot
|
||||
versionCode=80006
|
||||
versionName=8.0.6
|
||||
@@ -2,12 +2,12 @@
|
||||
package="com.mogo.map.impl.automap">
|
||||
|
||||
<application>
|
||||
<receiver
|
||||
android:name=".navi.AutoNaviReceiver"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="AUTONAVI_STANDARD_BROADCAST_SEND" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<!-- <receiver-->
|
||||
<!-- android:name=".navi.AutoNaviReceiver"-->
|
||||
<!-- android:exported="true">-->
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="AUTONAVI_STANDARD_BROADCAST_SEND" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </receiver>-->
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zhidao.mogo.module.main.independent;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@@ -16,8 +16,19 @@ public class MainIndependentActivity extends MainActivity {
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
super.initViews();
|
||||
FrameLayout.LayoutParams entranceParams = ( ( FrameLayout.LayoutParams ) mEntrance.getLayoutParams() );
|
||||
entranceParams.leftMargin = getResources().getDimensionPixelSize( R.dimen.module_main_entrance_fragment_container_marginLeft );
|
||||
mEntrance.setLayoutParams( entranceParams );
|
||||
|
||||
FrameLayout.LayoutParams headerParams = ( ( FrameLayout.LayoutParams ) mHeader.getLayoutParams() );
|
||||
headerParams.leftMargin = getResources().getDimensionPixelSize( R.dimen.module_main_header_fragment_container_marginLeft );
|
||||
mHeader.setLayoutParams( headerParams );
|
||||
|
||||
|
||||
// mApps.setVisibility(View.GONE);
|
||||
// mLeftShadowFrame.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_main_entrance_fragment_container_marginLeft">350px</dimen>
|
||||
<dimen name="module_main_header_fragment_container_marginLeft">366px</dimen>
|
||||
</resources>
|
||||
@@ -8,7 +8,6 @@
|
||||
<intent-filter>
|
||||
<!-- 一个新应用包已经安装在设备上,数据包括包名(最新安装的包程序不能接收到这个广播)-->
|
||||
<action android:name="android.intent.action.PACKAGE_ADDED" />
|
||||
<action android:name="android.intent.action.PACKAGE_INSTALL" />
|
||||
<!-- 一个新版本的应用安装到设备,替换之前已经存在的版本-->
|
||||
<action android:name="android.intent.action.PACKAGE_REPLACED" />
|
||||
<!-- 一个已存在的应用程序包已经从设备上移除,包括包名(正在被安装的包程序不能接收到这个广播)-->
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.mogo.module.common.map;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.utils.AppUtils;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/6/5
|
||||
* <p>
|
||||
* 自定义导航功能拦截器
|
||||
*/
|
||||
class CustomNaviInterrupter implements Interrupter {
|
||||
|
||||
private static final String TAG = "CustomNaviInterrupter";
|
||||
|
||||
private static volatile CustomNaviInterrupter sInstance;
|
||||
|
||||
private CustomNaviInterrupter() {
|
||||
}
|
||||
|
||||
public static CustomNaviInterrupter getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( CustomNaviInterrupter.class ) {
|
||||
if ( sInstance == null ) {
|
||||
sInstance = new CustomNaviInterrupter();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public synchronized void release() {
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean interrupt() {
|
||||
if ( AppUtils.isAppInstalled( AbsMogoApplication.getApp(), "com.autonavi.amapauto" )
|
||||
|| DebugConfig.isUseCustomNavi() ) {
|
||||
Logger.d( TAG, "do not use custom map function." );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -188,7 +188,7 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
return R.layout.module_ext_layout_entrance;
|
||||
}
|
||||
|
||||
private List<View> demoCache = new ArrayList<>();
|
||||
private List< View > demoCache = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
@@ -279,9 +279,9 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
} );
|
||||
|
||||
// mNaviInfo = findViewById( R.id.module_entrance_id_navi_info_panel );
|
||||
ConstraintLayout rootView = findViewById(R.id.module_entrance_id_top_motion_layout);
|
||||
if(rootView!=null) {
|
||||
TopViewAnimHelper.getInstance().init(rootView);
|
||||
ConstraintLayout rootView = findViewById( R.id.module_entrance_id_top_motion_layout );
|
||||
if ( rootView != null ) {
|
||||
TopViewAnimHelper.getInstance().init( rootView );
|
||||
}
|
||||
|
||||
mExitNavi = findViewById( R.id.module_entrance_id_exit_navi );
|
||||
@@ -419,6 +419,7 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
return;
|
||||
}
|
||||
if ( mExitNavi.getVisibility() == View.GONE ) {
|
||||
// 避免先导航,后启动app导致无法显示控件
|
||||
onStartNavi();
|
||||
}
|
||||
mNaviInfo.notifyChanged( naviinfo );
|
||||
@@ -550,7 +551,7 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshUserInfo(UserInfo userInfo) {
|
||||
Logger.d(TAG, "刷新用户信息: " + userInfo);
|
||||
public void refreshUserInfo( UserInfo userInfo ) {
|
||||
Logger.d( TAG, "刷新用户信息: " + userInfo );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -60,4 +60,4 @@
|
||||
android:background="@drawable/module_main_launcher_bg"
|
||||
android:visibility="visible"
|
||||
tools:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
@@ -6,6 +6,7 @@ import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
import com.mogo.module.common.map.CustomNaviInterrupter;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
@@ -46,14 +47,17 @@ public class MapBroadCastHelper implements IMogoStatusChangedListener {
|
||||
}
|
||||
|
||||
public void notifyXiaozhi( MogoNaviInfo naviinfo ) {
|
||||
// Intent intent = new Intent( ACTION_NAV_SEND );
|
||||
// intent.putExtra( "KEY_TYPE", 10001 );
|
||||
// intent.putExtra( "NEXT_ROAD_NAME", naviinfo.getNextRoadName() );
|
||||
// intent.putExtra( "ROUTE_REMAIN_TIME_AUTO", naviinfo.getVoiceRetainTime() );
|
||||
// intent.putExtra( "ROUTE_REMAIN_DIS_AUTO", naviinfo.getVoiceRetainDistance() );
|
||||
// intent.putExtra( "ICON", naviinfo.getIconResId() );
|
||||
// mContext.sendBroadcast( intent );
|
||||
// Log.v( "MapBroadCastHelper", "action=" + ACTION_NAV_SEND + " NaviInfo" );
|
||||
if ( CustomNaviInterrupter.getInstance().interrupt() ) {
|
||||
return;
|
||||
}
|
||||
Intent intent = new Intent( ACTION_NAV_SEND );
|
||||
intent.putExtra( "KEY_TYPE", 10001 );
|
||||
intent.putExtra( "NEXT_ROAD_NAME", naviinfo.getNextRoadName() );
|
||||
intent.putExtra( "ROUTE_REMAIN_TIME_AUTO", naviinfo.getVoiceRetainTime() );
|
||||
intent.putExtra( "ROUTE_REMAIN_DIS_AUTO", naviinfo.getVoiceRetainDistance() );
|
||||
intent.putExtra( "ICON", naviinfo.getIconResId() );
|
||||
mContext.sendBroadcast( intent );
|
||||
Log.v( "MapBroadCastHelper", "action=" + ACTION_NAV_SEND + " NaviInfo" );
|
||||
}
|
||||
|
||||
|
||||
@@ -67,30 +71,30 @@ public class MapBroadCastHelper implements IMogoStatusChangedListener {
|
||||
}
|
||||
|
||||
public void mapFrount() {
|
||||
// notifyXizhiNavStatus( STATUS_NAV_FRONT );
|
||||
notifyXizhiNavStatus( STATUS_NAV_FRONT );
|
||||
}
|
||||
|
||||
public void mapBackground() {
|
||||
// notifyXizhiNavStatus( STATUS_NAV_BACKGROUND );
|
||||
notifyXizhiNavStatus( STATUS_NAV_BACKGROUND );
|
||||
}
|
||||
|
||||
public void startNavi() {
|
||||
// notifyXizhiNavStatus( STATUS_NAV_START );
|
||||
notifyXizhiNavStatus( STATUS_NAV_START );
|
||||
}
|
||||
|
||||
public void stopNavi() {
|
||||
// notifyXizhiNavStatus( STATUS_NAV_STOP );
|
||||
notifyXizhiNavStatus( STATUS_NAV_STOP );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusChanged( StatusDescriptor descriptor, boolean isTrue ) {
|
||||
if ( descriptor == StatusDescriptor.AI_ASSIST_READY ) {
|
||||
if ( isTrue ) {
|
||||
// if ( AppUtils.isApplicationBroughtToBackground( mContext ) ) {
|
||||
// mapBackground();
|
||||
// } else {
|
||||
// mapFrount();
|
||||
// }
|
||||
if ( AppUtils.isApplicationBroughtToBackground( mContext ) ) {
|
||||
mapBackground();
|
||||
} else {
|
||||
mapFrount();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.mogo.map.navi.MogoNaviConfig;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.map.uicontroller.MapControlResult;
|
||||
import com.mogo.module.common.map.CustomNaviInterrupter;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
@@ -116,10 +117,13 @@ public class MapPresenter extends Presenter< MapView > implements
|
||||
onChangeDayNightMode( day_night_mode );
|
||||
//继续导航
|
||||
} else if ( key_type == 10049 ) {
|
||||
// boolean extra_endurance_data = intent.getBooleanExtra( "EXTRA_ENDURANCE_DATA", false );
|
||||
// if ( extra_endurance_data ) {
|
||||
// onContinueNavigation();
|
||||
// }
|
||||
if ( CustomNaviInterrupter.getInstance().interrupt() ) {
|
||||
return;
|
||||
}
|
||||
boolean extra_endurance_data = intent.getBooleanExtra( "EXTRA_ENDURANCE_DATA", false );
|
||||
if ( extra_endurance_data ) {
|
||||
onContinueNavigation();
|
||||
}
|
||||
} else if ( key_type == 10006 ) {
|
||||
// 避免冲突,会同时发送两个广播,这里不操作。
|
||||
//int extra_is_show = intent.getIntExtra( "EXTRA_IS_SHOW", 0 );
|
||||
@@ -131,12 +135,21 @@ public class MapPresenter extends Presenter< MapView > implements
|
||||
} else if ( key_type == 10005 ) {
|
||||
int navi_route_prefer = intent.getIntExtra( "NAVI_ROUTE_PREFER", type );
|
||||
} else if ( key_type == 20009 ) {
|
||||
// onOpenNavi();
|
||||
if ( CustomNaviInterrupter.getInstance().interrupt() ) {
|
||||
return;
|
||||
}
|
||||
onOpenNavi();
|
||||
} else if ( key_type == 10038 || key_type == 10007 ) {
|
||||
// mLauncher.backToLauncher( getContext() );
|
||||
// onChoosePath( intent, key_type );
|
||||
if ( CustomNaviInterrupter.getInstance().interrupt() ) {
|
||||
return;
|
||||
}
|
||||
mLauncher.backToLauncher( getContext() );
|
||||
onChoosePath( intent, key_type );
|
||||
} else if ( key_type == 10021 ) {
|
||||
// onStopNaviInternal();
|
||||
if ( CustomNaviInterrupter.getInstance().interrupt() ) {
|
||||
return;
|
||||
}
|
||||
onStopNaviInternal();
|
||||
} else if ( key_type == 10005 ) {
|
||||
// 仅在导航场景下,⽀持第三⽅进⾏路线偏好的重新选择。
|
||||
// 避免收费 | 1
|
||||
@@ -149,12 +162,15 @@ public class MapPresenter extends Presenter< MapView > implements
|
||||
// 不走高速躲避收费和拥堵 | 8
|
||||
// 高速优先 | 20
|
||||
// 躲避拥堵且高速优先 | 24
|
||||
// int prefer = intent.getIntExtra( "NAVI_ROUTE_PREFER", 0 );
|
||||
// MogoNaviConfig config = new MogoNaviConfig().congestion( prefer == 4 )
|
||||
// .cost( prefer == 1 || prefer == 7 )
|
||||
// .highSpeed( prefer == 20 )
|
||||
// .avoidSpeed( prefer == 3 );
|
||||
// mMogoMapService.getNavi( getContext() ).reCalculateRoute( config );
|
||||
if ( CustomNaviInterrupter.getInstance().interrupt() ) {
|
||||
return;
|
||||
}
|
||||
int prefer = intent.getIntExtra( "NAVI_ROUTE_PREFER", 0 );
|
||||
MogoNaviConfig config = new MogoNaviConfig().congestion( prefer == 4 )
|
||||
.cost( prefer == 1 || prefer == 7 )
|
||||
.highSpeed( prefer == 20 )
|
||||
.avoidSpeed( prefer == 3 );
|
||||
mMogoMapService.getNavi( getContext() ).reCalculateRoute( config );
|
||||
|
||||
}
|
||||
}
|
||||
@@ -279,16 +295,18 @@ public class MapPresenter extends Presenter< MapView > implements
|
||||
private void zoomMap( boolean zoomIn ) {
|
||||
boolean isLocked = mMogoMapService.getMapUIController().isCarLocked();
|
||||
MapControlResult result = mView.getUIController().changeZoom( zoomIn );
|
||||
// if ( result == MapControlResult.TARGET ) {
|
||||
// UiThreadHandler.postDelayed( () -> {
|
||||
// if ( zoomIn ) {
|
||||
// AIAssist.getInstance( getContext() ).speakTTSVoice( "地图已是最大", VoicePreemptType.PREEMPT_TYPE_NEXT, null );
|
||||
// } else {
|
||||
// AIAssist.getInstance( getContext() ).speakTTSVoice( "地图已是最小", VoicePreemptType.PREEMPT_TYPE_NEXT, null );
|
||||
// }
|
||||
// }, 1_000L ); // 避免小智障播放完毕之前播报
|
||||
// return;
|
||||
// }
|
||||
if (! CustomNaviInterrupter.getInstance().interrupt() ) {
|
||||
if ( result == MapControlResult.TARGET ) {
|
||||
UiThreadHandler.postDelayed( () -> {
|
||||
if ( zoomIn ) {
|
||||
AIAssist.getInstance( getContext() ).speakTTSVoice( "地图已是最大", VoicePreemptType.PREEMPT_TYPE_NEXT, null );
|
||||
} else {
|
||||
AIAssist.getInstance( getContext() ).speakTTSVoice( "地图已是最小", VoicePreemptType.PREEMPT_TYPE_NEXT, null );
|
||||
}
|
||||
}, 1_000L ); // 避免小智障播放完毕之前播报
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ( isLocked ) {
|
||||
// 保持锁车状态
|
||||
UiThreadHandler.postDelayed( () -> {
|
||||
|
||||
@@ -2,14 +2,19 @@ package com.mogo.module.service.intent;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.map.search.geo.IMogoGeoSearch;
|
||||
import com.mogo.map.search.geo.IMogoGeoSearchListener;
|
||||
import com.mogo.map.search.geo.MogoGeocodeResult;
|
||||
@@ -24,6 +29,9 @@ import com.mogo.utils.TipToast;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-04-17
|
||||
@@ -148,6 +156,120 @@ public class MockIntentHandler implements IntentHandler {
|
||||
double lon = intent.getFloatExtra( "lon", 0.0f );
|
||||
MarkerServiceHandler.getNavi().naviTo( new MogoLatLng( lat, lon ) );
|
||||
}
|
||||
case 14: {
|
||||
List< MogoLatLng > mogoLatLngs = new ArrayList<>();
|
||||
mogoLatLngs.add(new MogoLatLng(116.396716,39.615986));
|
||||
mogoLatLngs.add(new MogoLatLng(116.396995,39.616007));
|
||||
mogoLatLngs.add(new MogoLatLng(116.397169,39.616012));
|
||||
mogoLatLngs.add(new MogoLatLng(116.397343,39.616017));
|
||||
mogoLatLngs.add(new MogoLatLng(116.397517,39.616022));
|
||||
mogoLatLngs.add(new MogoLatLng(116.397693,39.616029));
|
||||
mogoLatLngs.add(new MogoLatLng(116.397896,39.616039));
|
||||
mogoLatLngs.add(new MogoLatLng(116.3981,39.616051));
|
||||
mogoLatLngs.add(new MogoLatLng(116.39827,39.616058));
|
||||
mogoLatLngs.add(new MogoLatLng(116.398441,39.616066));
|
||||
mogoLatLngs.add(new MogoLatLng(116.398612,39.616074));
|
||||
mogoLatLngs.add(new MogoLatLng(116.398787,39.616083));
|
||||
mogoLatLngs.add(new MogoLatLng(116.39899,39.616093));
|
||||
mogoLatLngs.add(new MogoLatLng(116.399195,39.616105));
|
||||
mogoLatLngs.add(new MogoLatLng(116.399334,39.616112));
|
||||
mogoLatLngs.add(new MogoLatLng(116.399473,39.61612));
|
||||
mogoLatLngs.add(new MogoLatLng(116.399612,39.616128));
|
||||
mogoLatLngs.add(new MogoLatLng(116.399751,39.616136));
|
||||
mogoLatLngs.add(new MogoLatLng(116.399893,39.616148));
|
||||
mogoLatLngs.add(new MogoLatLng(116.40008,39.616153));
|
||||
mogoLatLngs.add(new MogoLatLng(116.400301,39.616159));
|
||||
mogoLatLngs.add(new MogoLatLng(116.400471,39.616167));
|
||||
mogoLatLngs.add(new MogoLatLng(116.400642,39.616175));
|
||||
mogoLatLngs.add(new MogoLatLng(116.400813,39.616183));
|
||||
mogoLatLngs.add(new MogoLatLng(116.400988,39.616192));
|
||||
mogoLatLngs.add(new MogoLatLng(116.401191,39.616201));
|
||||
mogoLatLngs.add(new MogoLatLng(116.401396,39.616213));
|
||||
mogoLatLngs.add(new MogoLatLng(116.401728,39.616235));
|
||||
mogoLatLngs.add(new MogoLatLng(116.401986,39.616246));
|
||||
mogoLatLngs.add(new MogoLatLng(116.402146,39.61625));
|
||||
mogoLatLngs.add(new MogoLatLng(116.402307,39.616255));
|
||||
mogoLatLngs.add(new MogoLatLng(116.402468,39.61626));
|
||||
mogoLatLngs.add(new MogoLatLng(116.40263,39.616267));
|
||||
mogoLatLngs.add(new MogoLatLng(116.402762,39.616272));
|
||||
mogoLatLngs.add(new MogoLatLng(116.402894,39.616277));
|
||||
mogoLatLngs.add(new MogoLatLng(116.403026,39.616282));
|
||||
mogoLatLngs.add(new MogoLatLng(116.403158,39.616287));
|
||||
mogoLatLngs.add(new MogoLatLng(116.40329,39.616292));
|
||||
mogoLatLngs.add(new MogoLatLng(116.403422,39.616297));
|
||||
mogoLatLngs.add(new MogoLatLng(116.403554,39.616302));
|
||||
mogoLatLngs.add(new MogoLatLng(116.403686,39.616307));
|
||||
mogoLatLngs.add(new MogoLatLng(116.403821,39.616321));
|
||||
mogoLatLngs.add(new MogoLatLng(116.404045,39.616331));
|
||||
mogoLatLngs.add(new MogoLatLng(116.404272,39.616343));
|
||||
mogoLatLngs.add(new MogoLatLng(116.404551,39.616353));
|
||||
mogoLatLngs.add(new MogoLatLng(116.404753,39.616363));
|
||||
mogoLatLngs.add(new MogoLatLng(116.404958,39.616375));
|
||||
mogoLatLngs.add(new MogoLatLng(116.405055,39.616375));
|
||||
mogoLatLngs.add(new MogoLatLng(116.405184,39.616379));
|
||||
mogoLatLngs.add(new MogoLatLng(116.405313,39.616384));
|
||||
mogoLatLngs.add(new MogoLatLng(116.405442,39.616389));
|
||||
mogoLatLngs.add(new MogoLatLng(116.405571,39.616394));
|
||||
mogoLatLngs.add(new MogoLatLng(116.4057,39.616399));
|
||||
mogoLatLngs.add(new MogoLatLng(116.405829,39.616404));
|
||||
mogoLatLngs.add(new MogoLatLng(116.405958,39.616409));
|
||||
mogoLatLngs.add(new MogoLatLng(116.406087,39.616414));
|
||||
mogoLatLngs.add(new MogoLatLng(116.406216,39.616419));
|
||||
mogoLatLngs.add(new MogoLatLng(116.406345,39.616424));
|
||||
mogoLatLngs.add(new MogoLatLng(116.406474,39.616429));
|
||||
mogoLatLngs.add(new MogoLatLng(116.406611,39.61644));
|
||||
mogoLatLngs.add(new MogoLatLng(116.406879,39.616461));
|
||||
mogoLatLngs.add(new MogoLatLng(116.407033,39.616465));
|
||||
mogoLatLngs.add(new MogoLatLng(116.407187,39.616469));
|
||||
mogoLatLngs.add(new MogoLatLng(116.407341,39.616473));
|
||||
mogoLatLngs.add(new MogoLatLng(116.407495,39.616477));
|
||||
mogoLatLngs.add(new MogoLatLng(116.407694,39.616483));
|
||||
mogoLatLngs.add(new MogoLatLng(116.407876,39.616493));
|
||||
mogoLatLngs.add(new MogoLatLng(116.408059,39.616504));
|
||||
mogoLatLngs.add(new MogoLatLng(116.408327,39.616515));
|
||||
mogoLatLngs.add(new MogoLatLng(116.408596,39.616526));
|
||||
mogoLatLngs.add(new MogoLatLng(116.408757,39.616536));
|
||||
mogoLatLngs.add(new MogoLatLng(116.409025,39.616547));
|
||||
mogoLatLngs.add(new MogoLatLng(116.409227,39.616556));
|
||||
mogoLatLngs.add(new MogoLatLng(116.409432,39.616568));
|
||||
mogoLatLngs.add(new MogoLatLng(116.409711,39.616579));
|
||||
mogoLatLngs.add(new MogoLatLng(116.409914,39.61659));
|
||||
mogoLatLngs.add(new MogoLatLng(116.410119,39.616601));
|
||||
mogoLatLngs.add(new MogoLatLng(116.410387,39.616601));
|
||||
mogoLatLngs.add(new MogoLatLng(116.410602,39.616601));
|
||||
mogoLatLngs.add(new MogoLatLng(116.410816,39.616622));
|
||||
mogoLatLngs.add(new MogoLatLng(116.411084,39.616633));
|
||||
mogoLatLngs.add(new MogoLatLng(116.411395,39.616643));
|
||||
mogoLatLngs.add(new MogoLatLng(116.411492,39.616654));
|
||||
mogoLatLngs.add(new MogoLatLng(116.411771,39.616665));
|
||||
mogoLatLngs.add(new MogoLatLng(116.411974,39.616674));
|
||||
mogoLatLngs.add(new MogoLatLng(116.412178,39.616686));
|
||||
mogoLatLngs.add(new MogoLatLng(116.412447,39.616697));
|
||||
mogoLatLngs.add(new MogoLatLng(116.412586,39.616697));
|
||||
mogoLatLngs.add(new MogoLatLng(116.412876,39.616718));
|
||||
mogoLatLngs.add(new MogoLatLng(116.413144,39.616729));
|
||||
mogoLatLngs.add(new MogoLatLng(116.413347,39.616738));
|
||||
mogoLatLngs.add(new MogoLatLng(116.413551,39.61675));
|
||||
mogoLatLngs.add(new MogoLatLng(116.41383,39.61675));
|
||||
mogoLatLngs.add(new MogoLatLng(116.414002,39.616761));
|
||||
mogoLatLngs.add(new MogoLatLng(116.414098,39.616761));
|
||||
mogoLatLngs.add(new MogoLatLng(116.414279,39.616767));
|
||||
mogoLatLngs.add(new MogoLatLng(116.414461,39.616774));
|
||||
mogoLatLngs.add(new MogoLatLng(116.414645,39.616782));
|
||||
mogoLatLngs.add(new MogoLatLng(116.41483,39.616792));
|
||||
mogoLatLngs.add(new MogoLatLng(116.415016,39.616802));
|
||||
mogoLatLngs.add(new MogoLatLng(116.415203,39.616814));
|
||||
mogoLatLngs.add(new MogoLatLng(116.415395,39.616824));
|
||||
mogoLatLngs.add(new MogoLatLng(116.415589,39.616836));
|
||||
mogoLatLngs.add(new MogoLatLng(116.415745,39.616842));
|
||||
mogoLatLngs.add(new MogoLatLng(116.415902,39.616849));
|
||||
mogoLatLngs.add(new MogoLatLng(116.416061,39.616857));
|
||||
mogoLatLngs.add(new MogoLatLng(116.416307,39.616868));
|
||||
MogoMarkerOptions options = new MogoMarkerOptions();
|
||||
options.icon( BitmapFactory.decodeResource( AbsMogoApplication.getApp().getResources(), R.drawable.icon_map_marker_car_gray ) )
|
||||
.position( mogoLatLngs.get( 0 ) );
|
||||
IMogoMarker marker = MarkerServiceHandler.getMarkerManager().addMarker( TAG, options );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user