Merge branch 'feature/v1.0.3' of http://gitlab.zhidaoauto.com/ecos/yycp-service/Launcher into feature/v1.0.3

This commit is contained in:
unknown
2020-03-26 11:40:06 +08:00
14 changed files with 167 additions and 80 deletions

View File

@@ -27,24 +27,24 @@ PASSWORD=xintai2018
RELEASE=false
# 模块版本
## 工程内模块
MOGO_MODULE_SHARE_VERSION=1.0.2-SNAPSHOT
MOGO_COMMONS_VERSION=1.0.2-SNAPSHOT
MOGO_UTILS_VERSION=1.0.2-SNAPSHOT
MAP_AMAP_VERSION=1.0.2-SNAPSHOT
MOGO_MAP_VERSION=1.0.2-SNAPSHOT
MOGO_MAP_API_VERSION=1.0.2-SNAPSHOT
MOGO_MODULE_COMMON_VERSION=1.0.2-SNAPSHOT
MOGO_MODULE_MAIN_VERSION=1.0.2-SNAPSHOT
MOGO_MODULE_MAP_VERSION=1.0.2-SNAPSHOT
MOGO_SERVICE_VERSION=1.0.2-SNAPSHOT
MOGO_SERVICE_API_VERSION=1.0.2-SNAPSHOT
MOGO_MODULE_APPS_VERSION=1.0.2-SNAPSHOT
MOGO_CONNECTION_VERSION=1.0.2-SNAPSHOT
MOGO_MODULE_NAVI_VERSION=1.0.2-SNAPSHOT
MOGO_MODULE_SERVICE_VERSION=1.0.2-SNAPSHOT
MOGO_MODULE_EXTENSIONS_VERSION=1.0.2-SNAPSHOT
MOGO_MODULE_SEARCH_VERSION=1.0.2-SNAPSHOT
MOGO_MODULE_BACK_VERSION=1.0.2-SNAPSHOT
MOGO_MODULE_SHARE_VERSION=1.0.3-SNAPSHOT
MOGO_COMMONS_VERSION=1.0.3-SNAPSHOT
MOGO_UTILS_VERSION=1.0.3-SNAPSHOT
MAP_AMAP_VERSION=1.0.3-SNAPSHOT
MOGO_MAP_VERSION=1.0.3-SNAPSHOT
MOGO_MAP_API_VERSION=1.0.3-SNAPSHOT
MOGO_MODULE_COMMON_VERSION=1.0.3-SNAPSHOT
MOGO_MODULE_MAIN_VERSION=1.0.3-SNAPSHOT
MOGO_MODULE_MAP_VERSION=1.0.3-SNAPSHOT
MOGO_SERVICE_VERSION=1.0.3-SNAPSHOT
MOGO_SERVICE_API_VERSION=1.0.3-SNAPSHOT
MOGO_MODULE_APPS_VERSION=1.0.3-SNAPSHOT
MOGO_CONNECTION_VERSION=1.0.3-SNAPSHOT
MOGO_MODULE_NAVI_VERSION=1.0.3-SNAPSHOT
MOGO_MODULE_SERVICE_VERSION=1.0.3-SNAPSHOT
MOGO_MODULE_EXTENSIONS_VERSION=1.0.3-SNAPSHOT
MOGO_MODULE_SEARCH_VERSION=1.0.3-SNAPSHOT
MOGO_MODULE_BACK_VERSION=1.0.3-SNAPSHOT
MOGO_MODULE_AUTHORIZE_VERSION=1.0.0-SNAPSHOT
MOGO_MODULE_GUIDE_VERSION=1.0.0-SNAPSHOT
@@ -56,7 +56,7 @@ CARCHATTING_VERSION=1.0.2.3-SNAPSHOT
# 车聊聊接口
CARCHATTINGPROVIDER_VERSION=1.0.2.3-SNAPSHOT
# 在线车辆F
MOGO_MODULE_ONLINECAR_VERSION=1.0.1-SNAPSHOT
MOGO_MODULE_ONLINECAR_VERSION=1.0.2-SNAPSHOT
# v2x
MOGO_MODULE_V2X_VERSION=1.0.3-SNAPSHOT
# 媒体卡片

View File

@@ -171,24 +171,33 @@ public class NaviListenerAdapter extends AMapNaviListenerAdapter {
@Override
public void onEndEmulatorNavi() {
stopNaviDelay();
stopNaviDelay( () -> {
MogoNaviListenerHandler.getInstance().onEndEmulatorNavi();
} );
}
@Override
public void onArriveDestination() {
stopNaviDelay();
stopNaviDelay( () -> {
MogoNaviListenerHandler.getInstance().onArriveDestination();
} );
}
/**
* 避免导航结束语音播报被立刻打断的情况
*
* @param after 停止后的行为
*/
private void stopNaviDelay() {
private void stopNaviDelay( Runnable after ) {
UiThreadHandler.postDelayed( () -> {
if ( TextUtils.isEmpty( mLastSpeakWord ) || !mLastSpeakWord.contains( "结束" ) ) {
AIAssist.getInstance( mContext ).speakTTSVoice( "到达目的地附近,本次导航结束" );
}
mLastSpeakWord = "";
stopNavi();
if ( after != null ) {
after.run();
}
}, 5_000L );
}
@@ -238,10 +247,6 @@ public class NaviListenerAdapter extends AMapNaviListenerAdapter {
if ( mNaviOverlayHelper != null ) {
mNaviOverlayHelper.handleClickedPolyline( polyline, isNaviing() );
mAMapNavi.selectRouteId( mNaviOverlayHelper.getSelectedPathId() );
// if ( isNaviing() ) {
// mAMapNavi.stopNavi();
// mAMapNavi.startNavi( mClient.isRealNavi() ? NaviType.GPS : NaviType.EMULATOR );
// }
}
}

View File

@@ -0,0 +1,20 @@
package com.mogo.map.navi;
/**
* @author congtaowang
* @since 2019-12-25
* <p>
* 导航监听:区分导航结束
*/
public interface IMogoNaviListener2 extends IMogoNaviListener {
/**
* 实际导航结束
*/
void onArriveDestination();
/**
* 模拟导航结束
*/
void onEndEmulatorNavi();
}

View File

@@ -6,7 +6,7 @@ package com.mogo.map.navi;
* <p>
* 地图监听注册管理
*/
public class MogoNaviListenerHandler implements IMogoNaviListener, IMogoNaviListenerRegister, IMogoAimlessModeListener {
public class MogoNaviListenerHandler implements IMogoNaviListener2, IMogoNaviListenerRegister, IMogoAimlessModeListener {
private static volatile MogoNaviListenerHandler sInstance;
@@ -128,4 +128,18 @@ public class MogoNaviListenerHandler implements IMogoNaviListener, IMogoNaviList
mAimlessDelegateListener.onUpdateCongestion( info );
}
}
@Override
public void onArriveDestination() {
if ( mDelegateListener instanceof IMogoNaviListener2 ) {
( ( IMogoNaviListener2 ) mDelegateListener ).onArriveDestination();
}
}
@Override
public void onEndEmulatorNavi() {
if ( mDelegateListener instanceof IMogoNaviListener2 ) {
( ( IMogoNaviListener2 ) mDelegateListener ).onEndEmulatorNavi();
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -36,6 +36,7 @@ public class ExtensionsModuleConst {
//唤醒指令
//分享路况/上报路况/上报拥堵/上报交通检查/上报封路 唤醒
public static final String UPLOAD_ROAD_CONDITION_AWAKEN = "com.zhidao.pathfinder.report.roadCondition";
public static final String UPLOAD_ROAD_CONDITION = "command_upload_roadcondition";
//关闭分享框 唤醒
public static final String SHARE_DIALOG_CLOSE = "com.zhidao.share.close";
// 两次未回复关闭分享对话框

View File

@@ -125,6 +125,8 @@ public class EntrancePresenter extends Presenter<EntranceView> {
* 注册唤醒命令
*/
private void registerAwakeVoice() {
mogoIntentManager.registerIntentListener(ExtensionsModuleConst.UPLOAD_ROAD_CONDITION, mogoIntentListener);
mogoIntentManager.registerIntentListener(ExtensionsModuleConst.GO_TO_SHARE, mogoIntentListener);
mogoIntentManager.registerIntentListener(ExtensionsModuleConst.SHARE_DIALOG_CLOSE, mogoIntentListener);
mogoIntentManager.registerIntentListener(ExtensionsModuleConst.UPLOAD_ROAD_CONDITION_AWAKEN, mogoIntentListener);
@@ -206,6 +208,8 @@ public class EntrancePresenter extends Presenter<EntranceView> {
ShareControl.getInstance(mContext).dismissDialog();
Logger.d(TAG, "mogoIntentListener 两次未回复关闭对话框");
}
} else if (intentStr.equals(ExtensionsModuleConst.UPLOAD_ROAD_CONDITION)) { //上报路况 免唤醒 --ok
uploadRoadCondition();
}
}
};
@@ -244,7 +248,8 @@ public class EntrancePresenter extends Presenter<EntranceView> {
Log.d(TAG, "handleNeedAuthorizeCmd 上报封路 ----> ");
uploadRoadClosed();
} else if (mVoiceCmdType.equals(ExtensionsModuleConst.UPLOAD_ROAD_BLOCK)
|| mVoiceCmdType.equals(ExtensionsModuleConst.UPLOAD_ROAD_CONDITION_AWAKEN)) { //上报拥堵, 分享路况, 上报路况
|| mVoiceCmdType.equals(ExtensionsModuleConst.UPLOAD_ROAD_CONDITION_AWAKEN)
|| mVoiceCmdType.equals(ExtensionsModuleConst.UPLOAD_ROAD_CONDITION)) { //上报拥堵, 分享路况, 上报路况
Log.d(TAG, "handleNeedAuthorizeCmd 上报路况 ----> ");
uploadRoadCondition();
}

View File

@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"
>
<gradient
android:angle="180"
android:endColor="#3E7FFC"
android:startColor="#5CC1FF" />
<corners android:bottomLeftRadius="@dimen/dp_20"/>
<corners
android:bottomLeftRadius="@dimen/dp_20"
/>
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/dp_20" />
<solid android:color="#3F4057" />
</shape>

View File

@@ -1,58 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="@dimen/dp_790"
android:layout_height="@dimen/dp_440"
app:cardPreventCornerOverlap="false"
android:orientation="vertical"
app:cardBackgroundColor="#3F4057"
app:cardCornerRadius="@dimen/dp_20"
android:background="@drawable/shape_round_gray"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_56"
android:layout_marginTop="@dimen/dp_134"
android:text="是否退出导航?"
android:textColor="@color/white"
android:textSize="@dimen/sp_40"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_56"
android:layout_marginTop="@dimen/dp_134"
android:text="是否退出导航?"
android:textColor="@color/white"
android:textSize="@dimen/sp_40"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:id="@+id/tv_dialog_ok"
android:layout_width="@dimen/dp_395"
android:layout_height="@dimen/dp_128"
android:background="@drawable/shape_react_blue_grident"
android:gravity="center"
android:text="确认"
android:textColor="@color/white"
android:textSize="@dimen/dp_40"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
/>
<TextView
android:id="@+id/tv_dialog_cancel"
android:layout_width="@dimen/dp_395"
android:layout_height="@dimen/dp_128"
android:background="@drawable/shape_react_gray_grident"
android:gravity="center"
android:text="取消"
android:textColor="@color/white"
android:textSize="@dimen/dp_40"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/tv_dialog_ok"
android:layout_width="@dimen/dp_395"
android:layout_height="@dimen/dp_128"
android:background="@drawable/shape_react_blue_grident"
android:gravity="center"
android:text="确认"
android:textColor="@color/white"
android:textSize="@dimen/dp_40"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
/>
<TextView
android:id="@+id/tv_dialog_cancel"
android:layout_width="@dimen/dp_395"
android:layout_height="@dimen/dp_128"
android:background="@drawable/shape_react_gray_grident"
android:gravity="center"
android:text="取消"
android:textColor="@color/white"
android:textSize="@dimen/dp_40"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>

View File

@@ -19,6 +19,7 @@ import com.mogo.map.model.MogoPoi;
import com.mogo.map.navi.IMogoAimlessModeListener;
import com.mogo.map.navi.IMogoCarLocationChangedListener;
import com.mogo.map.navi.IMogoNaviListener;
import com.mogo.map.navi.IMogoNaviListener2;
import com.mogo.map.navi.MogoCongestionInfo;
import com.mogo.map.navi.MogoNaviInfo;
import com.mogo.map.navi.MogoTraffic;
@@ -59,7 +60,7 @@ import java.util.Map;
*/
public class MogoModulesManager implements MogoModulesHandler,
IMogoMapListener,
IMogoNaviListener,
IMogoNaviListener2,
IMogoLocationListener,
IMogoIntentListener {
@@ -671,6 +672,42 @@ public class MogoModulesManager implements MogoModulesHandler,
}
}
@Override
public void onArriveDestination() {
Iterator< IMogoNaviListener > iterator = MogoRegisterCenterHandler.getInstance().getNaviListeners();
if ( iterator == null ) {
return;
}
while ( iterator.hasNext() ) {
IMogoNaviListener listener = iterator.next();
if ( listener instanceof IMogoNaviListener2 ) {
try {
( ( IMogoNaviListener2 ) listener ).onArriveDestination();
} catch ( Exception e ) {
Logger.e( TAG, e, "error." );
}
}
}
}
@Override
public void onEndEmulatorNavi() {
Iterator< IMogoNaviListener > iterator = MogoRegisterCenterHandler.getInstance().getNaviListeners();
if ( iterator == null ) {
return;
}
while ( iterator.hasNext() ) {
IMogoNaviListener listener = iterator.next();
if ( listener instanceof IMogoNaviListener2 ) {
try {
( ( IMogoNaviListener2 ) listener ).onEndEmulatorNavi();
} catch ( Exception e ) {
Logger.e( TAG, e, "error." );
}
}
}
}
@Override
public String getCurrentModuleName() {
return mEnableModuleName;

View File

@@ -5,5 +5,10 @@
android:angle="180"
android:endColor="#3E7FFC"
android:startColor="#5CC1FF" />
<corners
android:bottomLeftRadius="@dimen/dp_20"
/>
</shape>

View File

@@ -440,7 +440,7 @@ public class MogoServices implements IMogoMapListener,
}
break;
case MotionEvent.ACTION_UP:
mStatusManager.setUserInteractionStatus( TAG, true, true );
restartAutoRefreshAtTime( ServiceConst.DEFAULT_AUTO_REFRESH_WHEN_INTERRUPT );
break;
}
}