diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/voice/VoiceNotice.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/voice/VoiceNotice.kt index f57f4c3648..43ef0ffb30 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/voice/VoiceNotice.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/voice/VoiceNotice.kt @@ -36,4 +36,14 @@ object VoiceNotice { } } } + + /** + * 中断当前在播语音 + */ + @JvmStatic + fun stopCurrentTts(){ + UiThreadHandler.post { + AIAssist.getInstance(AbsMogoApplication.getApp()).stopTts() + } + } } \ No newline at end of file diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java index 59fb2c2462..eff7f1e255 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java @@ -31,6 +31,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr; import com.mogo.eagle.core.utilcode.util.NetworkUtils; import com.mogo.eagle.core.utilcode.util.ToastUtils; +import com.mogo.eagle.core.utilcode.util.UiThreadHandler; import com.mogo.map.navi.IMogoCarLocationChangedListener2; import com.mogo.module.common.MogoApisHandler; import com.mogo.och.common.module.biz.constant.LoginStatusManager; @@ -1585,10 +1586,15 @@ public class TaxiModel { if (mOrderStatusCallback != null){ mOrderStatusCallback.onNaviToEnd(false,isVoicePlay); } - }else {//使用高德导航 - if (mOrderStatusCallback != null){ - mOrderStatusCallback.onNaviToEnd(true,isVoicePlay); - } + }else {//2s后若无轨迹数据使用高德导航 + UiThreadHandler.postDelayed(new Runnable() { + @Override + public void run() { + if (mRoutePoints.size() == 0 && mOrderStatusCallback != null){ + mOrderStatusCallback.onNaviToEnd(true,isVoicePlay); + } + } + },2000l); } } } diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiGrabOrderFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiGrabOrderFragment.java index 46b36f9bd9..4ddc217b6a 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiGrabOrderFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiGrabOrderFragment.java @@ -78,6 +78,7 @@ public class TaxiGrabOrderFragment extends BaseTaxiUIFragment implements View.On if (null != countDownTimer){ countDownTimer.cancel(); } + VoiceNotice.stopCurrentTts();//中断当前在播语音 getOchTaxiFragment().cancelNewBookingOrder(); }else if (v.getId() == R.id.grab_order_tv){ if (!mOrderGrabBt.getText().toString().equals("抢单中...")){ diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java index 17227329ec..bb8ff56c04 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java @@ -15,6 +15,7 @@ import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.api.map.smp.IMogoSmallMapProvider; +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager; import com.mogo.eagle.core.function.map.R; import com.mogo.eagle.core.utilcode.util.UiThreadHandler; @@ -38,6 +39,7 @@ public class SmallMapFragment extends BaseFragment IMoGoAutopilotStatusListener { private final String TAG = "SmallMapFragment"; protected SmallMapDirectionView mSmallMapDirectionView; + private int autoPilotStatus = 0; @Override public void onAttach(Context context) { @@ -139,9 +141,13 @@ public class SmallMapFragment extends BaseFragment @Override public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) { - if (autoPilotStatusInfo.getPilotmode() != 1) { + int tempStatus = autoPilotStatusInfo.getPilotmode(); + if (tempStatus != 1) { clearPolyline(); + }else if (tempStatus == 0 && autoPilotStatus == 1){ + CallerAutoPilotManager.INSTANCE.getGlobalPath(); } + autoPilotStatus = tempStatus; } @Override @@ -172,7 +178,7 @@ public class SmallMapFragment extends BaseFragment for (MessagePad.Location routeModel : globalPathResp.getWayPointsList()) { latLngList.add(new MogoLatLng(routeModel.getLatitude(), routeModel.getLongitude())); } - if (latLngList.size() > 0) { + if (latLngList.size() > 0 && autoPilotStatus ==1) { drawablePolyline(latLngList); } else { clearPolyline(); diff --git a/gradle.properties b/gradle.properties index 46e3e34c1b..3d4b65f124 100644 --- a/gradle.properties +++ b/gradle.properties @@ -85,7 +85,7 @@ MOGO_LOCATION_VERSION=1.4.3.26 MOGO_TELEMATIC_VERSION=1.4.3.26 ######## MogoAiCloudSDK Version ######## # 自研地图 -MAP_SDK_VERSION=2.7.0.9 +MAP_SDK_VERSION=2.7.0.10 MAP_SDK_OPERATION_VERSION=1.1.3.5 # websocket WEBSOCKET_VERSION=1.1.7