[8.2.8][i18n] 所有吐司 中文抽取

This commit is contained in:
xinfengkun
2025-11-12 19:35:55 +08:00
parent 08a5352df5
commit 8f6e8de77e
119 changed files with 1217 additions and 430 deletions

View File

@@ -452,7 +452,8 @@ class DriverM1Model {
&& TextUtils.isEmpty(it.csvFileUrl)
&& TextUtils.isEmpty(it.csvFileUrlDPQP)
) {
ToastUtils.showLong("无发布轨迹, 请发布后重试")
// ToastUtils.showLong("无发布轨迹, 请发布后重试")
ToastUtils.showLong(R.string.module_taxi_no_publication_trajectory)
CallerLogger.e(
TAG, "isPassStartAutopilotCommand = " +
FunctionBuildConfig.isPassStartAutopilotCommand

View File

@@ -1,6 +1,7 @@
package com.magic.mogo.och.charter.view.autopilot
import androidx.lifecycle.ViewModel
import com.magic.mogo.och.charter.R
import com.magic.mogo.och.charter.bean.QueryCurrentOrderResponse.Result.Companion.ARRIVED
import com.magic.mogo.och.charter.callback.IDriverM1ControllerStatusCallback
import com.magic.mogo.och.charter.constant.CharterConst
@@ -54,7 +55,8 @@ class AutopilotStatusViewModel: ViewModel(), IDriverM1ControllerStatusCallback,
fun restartAutopilot() {
// todo 启动自驾必须有订单路线
if(isAnimateRunning.get()){
ToastUtils.showShort("启动自驾中")
// ToastUtils.showShort("启动自驾中")
ToastUtils.showShort(R.string.module_och_autopilot_starting)
}else {
if (DriverM1Model.get().isHaveOrder()) {
DriverM1Model.get().restartAutopilot()

View File

@@ -209,7 +209,8 @@ object CharterPassengerModel {
super.onAutopilotGuardian(guardianInfo)
guardianInfo?.let {
if (it.code=="EMAP_ATTITUDE_INIT_FAILED") {
ToastCharterUtils.showToastShort("请等待车辆完成掉头后再出发吧~")
// ToastCharterUtils.showToastShort("请等待车辆完成掉头后再出发吧~")
ToastCharterUtils.showToastShort(R.string.module_och_emap_attitude_init_failed)
}
}
}
@@ -1122,7 +1123,8 @@ object CharterPassengerModel {
fun startAutopilot() {
orderInfo?.let {
if (it.arriveStatus == OrderInfoResponse.ARRIVED) {
ToastCharterUtils.showToastLong("已到达目的地请重新选择线路")
// ToastCharterUtils.showToastLong("已到达目的地请重新选择线路")
ToastCharterUtils.showToastLong(R.string.module_och_car_arrived)
return
}
//1、判断轨迹Id是否可用
@@ -1132,7 +1134,8 @@ object CharterPassengerModel {
&& TextUtils.isEmpty(it.csvFileUrl)
&& TextUtils.isEmpty(it.csvFileUrlDPQP)
) {
ToastUtils.showLong("无发布轨迹, 请发布后重试")
// ToastUtils.showLong("无发布轨迹, 请发布后重试")
ToastUtils.showLong(R.string.module_taxi_no_publication_trajectory)
CallerLogger.e(
TAG, "isPassStartAutopilotCommand = " +
FunctionBuildConfig.isPassStartAutopilotCommand
@@ -1151,14 +1154,16 @@ object CharterPassengerModel {
}
val parameters = initAutopilotControlParameters()
if (null == parameters) {
ToastCharterUtils.showToastShort("请选择站点")
// ToastCharterUtils.showToastShort("请选择站点")
ToastCharterUtils.showToastShort(R.string.module_och_please_choose_station)
e(
SceneConstant.M_BUS + TAG,
"行程日志-AutopilotControlParameters is empty."
)
return
}
ToastCharterUtils.showToastShort("启动自动驾驶中")
// ToastCharterUtils.showToastShort("启动自动驾驶中")
ToastCharterUtils.showToastShort(R.string.module_och_starting_autopilot)
cleanRoutePoints()
OchAutoPilotManager.startAutoPilot(parameters)
d(

View File

@@ -4,6 +4,7 @@ import android.content.Context
import com.mogo.eagle.core.data.BaseData
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.och.charter.passenger.R
import com.mogo.och.charter.passenger.bean.request.ArriveDestRequest
import com.mogo.och.charter.passenger.bean.request.EndOrderRequest
import com.mogo.och.charter.passenger.bean.response.*
@@ -40,7 +41,8 @@ object BusPassengerServiceManager {
private fun beforeNet():Boolean{
if (draiverSn.isBlank()) {
ToastCharterUtils.showToastShort("已断开司机屏连接、请联系安全员")
// ToastCharterUtils.showToastShort("已断开司机屏连接、请联系安全员")
ToastCharterUtils.showToastShort(R.string.module_och_passenger_disconnect_driver)
return true
}
return false

View File

@@ -123,11 +123,13 @@ class BusPassengerPresenter(view: MainFragment?) :
OrderStatusEnum.NoOrderUse -> {
when (CallerAutoPilotStatusListenerManager.getState()) {
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {// 不可自动驾驶
ToastCharterUtils.showToastShort("设备未就绪请稍等,请安全员主动停止车辆")
// ToastCharterUtils.showToastShort("设备未就绪请稍等,请安全员主动停止车辆")
ToastCharterUtils.showToastShort(R.string.module_och_status_autopilot_disable_hint)
}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {//
ToastCharterUtils.showToastShort("因车辆正在人工驾驶中无法靠边停车,请安全员主动停止车辆")
// ToastCharterUtils.showToastShort("因车辆正在人工驾驶中无法靠边停车,请安全员主动停止车辆")
ToastCharterUtils.showToastShort(R.string.module_och_status_autopilot_enable_hint)
}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
@@ -136,7 +138,8 @@ class BusPassengerPresenter(view: MainFragment?) :
}
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> {
ToastCharterUtils.showToastShort("因车辆正在平行驾驶中无法靠边停车,请安全员主动停止车辆")
// ToastCharterUtils.showToastShort("因车辆正在平行驾驶中无法靠边停车,请安全员主动停止车辆")
ToastCharterUtils.showToastShort(R.string.module_och_status_parallel_driving_hint)
}
else -> {}
@@ -209,7 +212,8 @@ class BusPassengerPresenter(view: MainFragment?) :
StopSideStatus.EndingSuccess -> {
BeautifyManager.notifyViewChange(BeautifyManager.ChangeTypeEnum.STOPSITE_SUCCESS)
ToastCharterUtils.showToastShort("靠边停车成功")
// ToastCharterUtils.showToastShort("靠边停车成功")
ToastCharterUtils.showToastShort(R.string.module_och_stop_site_success)
VoiceNotice.showNotice(
context.getString(R.string.charter_p_stop_site_success),
AIAssist.LEVEL0
@@ -217,7 +221,8 @@ class BusPassengerPresenter(view: MainFragment?) :
}
StopSideStatus.EndingFaile -> {
ToastCharterUtils.showToastShort("车辆系统繁忙,请稍后再试")
// ToastCharterUtils.showToastShort("车辆系统繁忙,请稍后再试")
ToastCharterUtils.showToastShort(R.string.module_och_stop_site_ending_fail)
}
else -> {}
@@ -228,9 +233,11 @@ class BusPassengerPresenter(view: MainFragment?) :
override fun onDoorStatusCallback(isOpen: Boolean, isFirst: Boolean) {
if (!isFirst) {
if (isOpen) {
ToastCharterUtils.showToastShort("已开启车门")
// ToastCharterUtils.showToastShort("已开启车门")
ToastCharterUtils.showToastShort(R.string.module_och_car_door_opened)
} else {
ToastCharterUtils.showToastShort("已关门车门")
// ToastCharterUtils.showToastShort("已关门车门")
ToastCharterUtils.showToastShort(R.string.module_och_car_door_closed)
}
}
}
@@ -281,7 +288,8 @@ class BusPassengerPresenter(view: MainFragment?) :
temp = LatLng(it.latitude, it.longitude)
indexPoint.add(temp)
}
ToastCharterUtils.showToastShort("没有轨迹点")
// ToastCharterUtils.showToastShort("没有轨迹点")
ToastCharterUtils.showToastShort(R.string.module_och_not_point)
return indexPoint
}

View File

@@ -126,7 +126,8 @@ class MainFragment : MvpFragment<MainFragment?, BusPassengerPresenter?>(), IMogo
if (mPresenter?.haveOrder() == true) {
} else {
ToastCharterUtils.showToastShort("请确认订单")
// ToastCharterUtils.showToastShort("请确认订单")
ToastCharterUtils.showToastShort(R.string.module_och_order_affirm)
return true
}
} else {

View File

@@ -65,7 +65,8 @@ class GoViewWithArrive @JvmOverloads constructor(
})
setOnClickListener {
if (ClickUtils.isClickTooFrequent(this,3000)) {
ToastCharterUtils.showToastShort("请稍后点击")
// ToastCharterUtils.showToastShort("请稍后点击")
ToastCharterUtils.showToastShort(R.string.module_och_please_click_later)
return@setOnClickListener
}
startGo()
@@ -82,7 +83,8 @@ class GoViewWithArrive @JvmOverloads constructor(
}
when (CallerAutoPilotStatusListenerManager.getState()) {
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {// 不可自动驾驶
ToastCharterUtils.showToastShort("设备未就绪请稍等")
// ToastCharterUtils.showToastShort("设备未就绪请稍等")
ToastCharterUtils.showToastShort(R.string.module_och_status_autopilot_disable_hint1)
}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {//
onceRegisterAutoStatus()
@@ -90,10 +92,12 @@ class GoViewWithArrive @JvmOverloads constructor(
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
// 重新起步
StopSideManager.resetStopSide()
ToastCharterUtils.showToastShort("车辆行驶中,不要频繁点击哦~")
// ToastCharterUtils.showToastShort("车辆行驶中,不要频繁点击哦~")
ToastCharterUtils.showToastShort(R.string.module_och_car_running_hint)
}
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> {
ToastCharterUtils.showToastShort("车辆行驶中,不要频繁点击哦~")
// ToastCharterUtils.showToastShort("车辆行驶中,不要频繁点击哦~")
ToastCharterUtils.showToastShort(R.string.module_och_car_running_hint)
}
else -> {}
}

View File

@@ -31,17 +31,20 @@ class StopSiteView @JvmOverloads constructor(
private fun stopSite(){
when (CallerAutoPilotStatusListenerManager.getState()) {
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {// 不可自动驾驶
ToastCharterUtils.showToastShort("设备未就绪请稍等,请稍后再试")
// ToastCharterUtils.showToastShort("设备未就绪请稍等,请稍后再试")
ToastCharterUtils.showToastShort(R.string.module_och_status_autopilot_disable_hint2)
}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {//
ToastCharterUtils.showToastShort("因车辆正在人工驾驶中无法靠边停车,请稍后再试")
// ToastCharterUtils.showToastShort("因车辆正在人工驾驶中无法靠边停车,请稍后再试")
ToastCharterUtils.showToastShort(R.string.module_och_car_running_not_stop)
}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
// 靠边停车
StopSideManager.stopSide()
}
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> {
ToastCharterUtils.showToastShort("远程守护卫士操作中,稍后再试试吧~")
// ToastCharterUtils.showToastShort("远程守护卫士操作中,稍后再试试吧~")
ToastCharterUtils.showToastShort(R.string.module_och_car_parallel_driving_hint)
}
else -> {}
}

View File

@@ -77,7 +77,8 @@ class DebugView @JvmOverloads constructor(
getFragment()?.showNoviceGuidanceFragment()
}
debug_change_modle.setOnClickListener {
ToastCharterUtils.showToastShort("因车辆正在人工驾驶中无法靠边停车,请安全员主动停止车辆")
// ToastCharterUtils.showToastShort("因车辆正在人工驾驶中无法靠边停车,请安全员主动停止车辆")
ToastCharterUtils.showToastShort(R.string.module_och_status_autopilot_enable_hint)
when (HdMapBuildConfig.currentCarVrIconRes) {
R.raw.aiqinghao -> {
getFragment()?.setCarMode(OrderInfoResponse.M1_FAMILY)

View File

@@ -5,6 +5,7 @@ import com.mogo.eagle.core.data.BaseData
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.och.charter.passenger.R
import com.mogo.och.charter.passenger.callback.ITimeCallback
import com.mogo.och.charter.passenger.model.CharterPassengerModel
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils
@@ -66,7 +67,8 @@ class OrderInfoViewModel: ViewModel(), ITimeCallback {
CharterPassengerModel.endOrder(object : OchCommonServiceCallback<BaseData> {
override fun onSuccess(data: BaseData?) {
if (null != data && 0 == data.code) {
ToastCharterUtils.showToastShort("结束成功")
// ToastCharterUtils.showToastShort("结束成功")
ToastCharterUtils.showToastShort(R.string.module_och_success_achieved)
CharterPassengerModel.setEndOrderStatus()
viewCallback?.setViewGone()
val msg = EndOrderMsg(

View File

@@ -26,6 +26,7 @@ import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType
import com.mogo.och.common.module.manager.socket.lan.bean.LineSite
import com.mogo.och.common.module.constant.OchCommonConst
import com.mogo.och.bridge.autopilot.location.OchLocationManager
import com.mogo.och.charter.passenger.R
import com.mogo.och.common.module.network.OchCommonServiceCallback
import com.mogo.och.common.module.manager.stopside.StopSideManager
import com.mogo.och.common.module.manager.loop.BizLoopManager
@@ -87,7 +88,8 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
if (msg.arriveStatus == 2) {
return@post
}
ToastCharterUtils.showToastShort("站点确定")
// ToastCharterUtils.showToastShort("站点确定")
ToastCharterUtils.showToastShort(R.string.module_och_site_determined)
viewCallback?.setEnableSiteStatus(true)
checkLine = tempCheckLine
checkSite = tempCheckSite
@@ -100,7 +102,8 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
CharterPassengerModel.cleanbroadcastListInfo(checkSite)
CharterPassengerModel.queryOrder()
} else {
ToastCharterUtils.showToastShort("司机端拒绝请重新选择")
// ToastCharterUtils.showToastShort("司机端拒绝请重新选择")
ToastCharterUtils.showToastShort(R.string.module_och_driver_end_rejected)
viewCallback?.hideDataDriverRefuse()
}
RxUtils.disposeSubscribe(subscribeSelectSite)
@@ -207,7 +210,8 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
}
override fun onFail(code: Int, msg: String) {
ToastCharterUtils.showToastShort("查询线路失败")
// ToastCharterUtils.showToastShort("查询线路失败")
ToastCharterUtils.showToastShort(R.string.module_och_querying_route_failed)
viewCallback?.setVisableByTrun(showNetError = true)
}
@@ -220,7 +224,8 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
fun changeSites(siteList: MutableList<SiteInfoResponse.SiteInfo>) {
if (!CallerTelematicManager.getClientConnStatus()) {
ToastCharterUtils.showToastLong("乘客屏无法连接司机屏请联系安全员")
// ToastCharterUtils.showToastLong("乘客屏无法连接司机屏请联系安全员")
ToastCharterUtils.showToastLong(R.string.module_och_passenger_not_connect_driver)
return
}
val sentDataSite: MutableList<LineSite> = mutableListOf()
@@ -252,7 +257,8 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
RxUtils.disposeSubscribe(subscribeSelectSite)
subscribeSelectSite = RxUtils.createSubscribe(120_000) {
ToastCharterUtils.showToastShort("请联系安全员确认")
// ToastCharterUtils.showToastShort("请联系安全员确认")
ToastCharterUtils.showToastShort(R.string.module_och_please_security_officer_confirm)
viewCallback?.hideDataDriverRefuse()
}
}
@@ -300,13 +306,15 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
}
override fun onFail(code: Int, msg: String?) {
ToastCharterUtils.showToastShort("查询站点失败")
// ToastCharterUtils.showToastShort("查询站点失败")
ToastCharterUtils.showToastShort(R.string.module_och_query_site_failed)
viewCallback?.setVisableByTrun(showNetError = true)
}
override fun onError() {
super.onError()
ToastCharterUtils.showToastShort("查询站点失败")
// ToastCharterUtils.showToastShort("查询站点失败")
ToastCharterUtils.showToastShort(R.string.module_och_query_site_failed)
viewCallback?.setVisableByTrun(showNetError = true)
}
})
@@ -314,7 +322,8 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
private fun checkServerStatus() {
if (!CallerTelematicManager.getClientConnStatus()) {
ToastCharterUtils.showToastShort("断开和司机端连接、请联系安全员")
// ToastCharterUtils.showToastShort("断开和司机端连接、请联系安全员")
ToastCharterUtils.showToastShort(R.string.module_och_disconnect_driver)
BizLoopManager.removeLoopFunction(TAGLINELOOP)
viewCallback?.hideDataDriverRefuse()
CallerLogger.d(
@@ -385,14 +394,16 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
}
else -> {
ToastCharterUtils.showToastShort("自动驾驶中无法切换线路")
// ToastCharterUtils.showToastShort("自动驾驶中无法切换线路")
ToastCharterUtils.showToastShort(R.string.module_och_autopilot_now_not_change_line)
false
}
}
}
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> {
ToastCharterUtils.showToastShort("远程守护卫士操作中,稍后再试试吧~")
// ToastCharterUtils.showToastShort("远程守护卫士操作中,稍后再试试吧~")
ToastCharterUtils.showToastShort(R.string.module_och_car_parallel_driving_hint)
return false
}
@@ -401,11 +412,13 @@ class SelectLineViewModel : ViewModel(), IOrderStatusChangeListener {
} else {
when (CallerAutoPilotStatusListenerManager.getState()) {
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> {
ToastCharterUtils.showToastShort("远程守护卫士操作中,稍后再试试吧~")
// ToastCharterUtils.showToastShort("远程守护卫士操作中,稍后再试试吧~")
ToastCharterUtils.showToastShort(R.string.module_och_car_parallel_driving_hint)
return false
}
}
ToastCharterUtils.showToastShort("请停车后再修改目的地~")
// ToastCharterUtils.showToastShort("请停车后再修改目的地~")
ToastCharterUtils.showToastShort(R.string.module_och_stop_car_and_change_site)
return false
}
return true

View File

@@ -95,9 +95,11 @@ class OrderSiteItemAdapter(
checkChangeListener?.onCheckListener(tempInfo)
} else {
if (siteInfo.isNear) {
ToastCharterUtils.showToastShort("您已在此站点附近")
// ToastCharterUtils.showToastShort("您已在此站点附近")
ToastCharterUtils.showToastShort(R.string.module_och_in_site_nearby)
} else {
ToastCharterUtils.showToastShort("站点已过,请选择返程路线")
// ToastCharterUtils.showToastShort("站点已过,请选择返程路线")
ToastCharterUtils.showToastShort(R.string.module_och_site_having_already_hint)
}
}
}

View File

@@ -385,11 +385,13 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
if (leftLight) {
tv_light_top_01.text = context.getString(R.string.charter_p_open_light1)
tv_light_top_01.isChecked = true
if (!isFirst) ToastCharterUtils.showToastShort("打开顶灯1")
// if (!isFirst) ToastCharterUtils.showToastShort("打开顶灯1")
if (!isFirst) ToastCharterUtils.showToastShort(R.string.module_och_open_ceiling_light_1)
} else {
tv_light_top_01.text = context.getString(R.string.charter_p_close_light1)
tv_light_top_01.isChecked = false
if (!isFirst) ToastCharterUtils.showToastShort("关闭顶灯1")
// if (!isFirst) ToastCharterUtils.showToastShort("关闭顶灯1")
if (!isFirst) ToastCharterUtils.showToastShort(R.string.module_och_close_ceiling_light_1)
}
}
}
@@ -399,11 +401,13 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
if (rightLight) {
tv_light_top_02.text = context.getString(R.string.charter_p_open_light2)
tv_light_top_02.isChecked = true
if (!isFirst) ToastCharterUtils.showToastShort("打开顶灯2")
// if (!isFirst) ToastCharterUtils.showToastShort("打开顶灯2")
if (!isFirst) ToastCharterUtils.showToastShort(R.string.module_och_open_ceiling_light_2)
} else {
tv_light_top_02.text = context.getString(R.string.charter_p__close_light2)
tv_light_top_02.isChecked = false
if (!isFirst) ToastCharterUtils.showToastShort("关闭顶灯2")
// if (!isFirst) ToastCharterUtils.showToastShort("关闭顶灯2")
if (!isFirst) ToastCharterUtils.showToastShort(R.string.module_och_close_ceiling_light_2)
}
}
}
@@ -414,12 +418,14 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
tv_light_atmosphere.text = context.getString(R.string.charter_p_open_atmosphere)
tv_light_atmosphere.isChecked = true
iv_bottom_light_setting.setImageResource(R.drawable.charter_p_function_atmosphere_select)
if (!isFirst) ToastCharterUtils.showToastShort("打开氛围灯")
// if (!isFirst) ToastCharterUtils.showToastShort("打开氛围灯")
if (!isFirst) ToastCharterUtils.showToastShort(R.string.module_och_open_ambient_light)
} else {
tv_light_atmosphere.text = context.getString(R.string.charter_p_close_atmosphere)
tv_light_atmosphere.isChecked = false
iv_bottom_light_setting.setImageResource(R.drawable.charter_p_function_atmosphere_nor)
if (!isFirst) ToastCharterUtils.showToastShort("关闭氛围灯")
// if (!isFirst) ToastCharterUtils.showToastShort("关闭氛围灯")
if (!isFirst) ToastCharterUtils.showToastShort(R.string.module_och_close_ambient_light)
}
}
}

View File

@@ -11,6 +11,7 @@ import com.mogo.och.bridge.device.LightAirconditionDoorStatusManager
import com.mogo.och.bridge.device.data.AirconditionStatus
import com.mogo.och.bridge.device.data.HeaterStatue
import com.mogo.och.bridge.device.data.LightStatus
import com.mogo.och.charter.passenger.R
import com.mogo.och.common.module.utils.RxUtils
import io.reactivex.disposables.Disposable
@@ -146,7 +147,8 @@ class SoftControlViewModel : ViewModel(), LightAirconditionDoorCallback {
RxUtils.disposeSubscribe(airconditionDisposable)
airconditionDisposable = RxUtils.createSubscribe(10000) {
if (!LightAirconditionDoorStatusManager.airconditionStatus.isOpen && LightAirconditionDoorStatusManager.airconditionStatus.windSpeed != windSpeedCmd && LightAirconditionDoorStatusManager.airconditionStatus.temperature != temperatureCmd && LightAirconditionDoorStatusManager.airconditionStatus.pattert != modeCmd) {
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
}
}
}
@@ -159,7 +161,8 @@ class SoftControlViewModel : ViewModel(), LightAirconditionDoorCallback {
RxUtils.disposeSubscribe(airconditionDisposable)
airconditionDisposable = RxUtils.createSubscribe(10000) {
if (LightAirconditionDoorStatusManager.airconditionStatus.isOpen) {
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
}
}
}
@@ -173,7 +176,8 @@ class SoftControlViewModel : ViewModel(), LightAirconditionDoorCallback {
RxUtils.disposeSubscribe(heaterDisposable)
heaterDisposable = RxUtils.createSubscribe(10000) {
if (!LightAirconditionDoorStatusManager.heaterStatue.isOpen && LightAirconditionDoorStatusManager.heaterStatue.windSpeed != windSpeedCmd) {
ToastCharterUtils.showToastShort("暖风机操作未生效,请稍后重试吧~")
// ToastCharterUtils.showToastShort("暖风机操作未生效,请稍后重试吧~")
ToastCharterUtils.showToastShort(R.string.module_och_fan_heater_operation_invalid)
}
}
}
@@ -184,7 +188,8 @@ class SoftControlViewModel : ViewModel(), LightAirconditionDoorCallback {
RxUtils.disposeSubscribe(heaterDisposable)
heaterDisposable = RxUtils.createSubscribe(10000) {
if (LightAirconditionDoorStatusManager.heaterStatue.isOpen) {
ToastCharterUtils.showToastShort("暖风机操作未生效,请稍后重试吧~")//还是开着的
// ToastCharterUtils.showToastShort("暖风机操作未生效,请稍后重试吧~")//还是开着的
ToastCharterUtils.showToastShort(R.string.module_och_fan_heater_operation_invalid)//还是开着的
}
}
}
@@ -196,14 +201,16 @@ class SoftControlViewModel : ViewModel(), LightAirconditionDoorCallback {
CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp1Cmd(1)
RxUtils.createSubscribe {
if (!LightAirconditionDoorStatusManager.lightStatus.isOpenLight1) {
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
}
}
} else {
CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp1Cmd(2)
RxUtils.createSubscribe {
if (LightAirconditionDoorStatusManager.lightStatus.isOpenLight1) {
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
}
}
}
@@ -216,14 +223,16 @@ class SoftControlViewModel : ViewModel(), LightAirconditionDoorCallback {
CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp2Cmd(1)
RxUtils.createSubscribe {
if (!LightAirconditionDoorStatusManager.lightStatus.isOpenLight2) {
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
}
}
} else {
CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp2Cmd(2)
RxUtils.createSubscribe {
if (LightAirconditionDoorStatusManager.lightStatus.isOpenLight2) {
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
}
}
}
@@ -236,14 +245,16 @@ class SoftControlViewModel : ViewModel(), LightAirconditionDoorCallback {
CallerAutoPilotControlManager.sendRoboBusJinlvM1SmallLampCmd(1)
RxUtils.createSubscribe {
if (!LightAirconditionDoorStatusManager.lightStatus.isOpenatmosphere) {
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
}
}
} else {
CallerAutoPilotControlManager.sendRoboBusJinlvM1SmallLampCmd(2)
RxUtils.createSubscribe {
if (LightAirconditionDoorStatusManager.lightStatus.isOpenatmosphere) {
ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
// ToastCharterUtils.showToastShort("控制系统繁忙,请稍后再试")
ToastCharterUtils.showToastShort(R.string.module_och_control_system_busy)
}
}
}

View File

@@ -150,7 +150,8 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
override fun setStateAndUi(state: Int) {
super.setStateAndUi(state)
if(state==CURRENT_STATE_PLAYING_BUFFERING_START){
ToastCharterUtils.showToastShort("加载中请稍等")
// ToastCharterUtils.showToastShort("加载中请稍等")
ToastCharterUtils.showToastShort(R.string.module_och_loading)
}
}
@@ -281,7 +282,8 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
CallerLogger.d(TAG,"onError--${what}--${extra}")
MediaManager.setVideoFocusChange(false)
mThumbImageViewLayout?.visibility = View.VISIBLE
ToastCharterUtils.showToastLong("哎呀,出错了,看看其他视频吧")
// ToastCharterUtils.showToastLong("哎呀,出错了,看看其他视频吧")
ToastCharterUtils.showToastLong(R.string.module_och_video_error)
currentTime = -1
if(isIfCurrentIsFullscreen){
smalllPlayer?.clearFullscreenLayout(this)

View File

@@ -121,12 +121,14 @@ public class RecyclerVideoAdapter extends RecyclerView.Adapter<RecyclerItemVideo
@Override
public void onPlayError(String url, Object... objects) {
ToastCharterUtils.INSTANCE.showCharterLongToast("哎呀,出错了,看看其他视频吧");
// ToastCharterUtils.INSTANCE.showCharterLongToast("哎呀,出错了,看看其他视频吧");
ToastCharterUtils.INSTANCE.showCharterLongToast(R.string.module_och_video_error);
}
@Override
public void onClickStartError(String url, Object... objects) {
ToastCharterUtils.INSTANCE.showCharterLongToast("哎呀,出错了,看看其他视频吧");
// ToastCharterUtils.INSTANCE.showCharterLongToast("哎呀,出错了,看看其他视频吧");
ToastCharterUtils.INSTANCE.showCharterLongToast(R.string.module_och_video_error);
}
});
}

View File

@@ -11,6 +11,7 @@ import androidx.viewpager.widget.ViewPager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.util.CountDownTimer
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.biz.R
import com.mogo.och.common.module.biz.media.data.MediaItem
import com.mogo.och.biz.media.video.MediaLoopPlayView.Companion.IMAGE_COUNT_DOWN_SECONDS
import com.mogo.och.biz.media.video.MediaLoopPlayView.Companion.TAG
@@ -361,7 +362,8 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
if (mNewDataList.isNotEmpty()) {
setMediaData(mNewDataList)
mNewDataList.clear()
ToastUtils.showShort("宣传视频数据已更新")
// ToastUtils.showShort("宣传视频数据已更新")
ToastUtils.showShort(R.string.module_och_promotional_video_updated)
MediaPlayLogger.printInfoLog("playNextItemView, 宣传视频数据已更新")
return
}

View File

@@ -91,7 +91,8 @@ class ReportErrorPointView : WindowRelativeLayout,
tv_report_error_point_reason.onClick {
val checkDataList = errorPointItemAdapter.getCheckDataList()
if (checkDataList.isEmpty()) {
ToastUtils.showShort("请选择问题类型")
// ToastUtils.showShort("请选择问题类型")
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_choose_issue_type)
return@onClick
}
tv_report_error_point_reason_cancel.isEnabled = false

View File

@@ -5,6 +5,7 @@ import com.mogo.commons.AbsMogoApplication
import com.mogo.eagle.core.data.BaseData
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.biz.R
import com.mogo.och.biz.routing.bean.PointError
import com.mogo.och.biz.routing.bean.QueryPointErrorReasonsRsp
import com.mogo.och.biz.routing.bean.SaveGrayContrailErrorReasons
@@ -89,7 +90,8 @@ class ReportErrorPointViewModel : ViewModel() {
object : OchCommonServiceCallback<BaseData> {
override fun onSuccess(data: BaseData?) {
if (data != null && data.code == 0){
ToastUtils.showShort("提交成功")
// ToastUtils.showShort("提交成功")
ToastUtils.showShort(R.string.module_och_submit_successfully)
viewCallback?.submitErrorReasons()
}
}

View File

@@ -11,6 +11,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.NetworkUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.biz.R
import com.mogo.och.biz.routing.bean.GrayLineBean
import com.mogo.och.biz.routing.bean.QueryGrayContrailListRsp
import com.mogo.och.biz.routing.bean.QuerySitesReasons
@@ -109,7 +110,8 @@ class RoutingSelectModel : ViewModel() {
"queryRoutingGrayLineList onFail: code=$code, msg=$msg"
)
OchChainLogManager.writeChainLogRouting("[查询灰度路线]","[查询灰度路线] 请求fail, code=$code, msg=$msg, sn=${SharedPrefsMgr.getInstance().sn}")
ToastUtils.showShort("查询灰度线路列表异常, 请稍后重试, code=$code")
// ToastUtils.showShort("查询灰度线路列表异常, 请稍后重试, code=$code")
ToastUtils.showShort(R.string.module_och_query_routing_gray_line_list_fail, code)
viewCallback?.onQueryRoutingGrayLineListFailed(msg ?: "查询灰度线路列表异常, 请稍后重试")
}
@@ -191,7 +193,8 @@ class RoutingSelectModel : ViewModel() {
val grayId = data.taskId
val stationList = data.stationList
if (grayLineBean == null || contrailBean == null || stationList.size < 2) {
ToastUtils.showShort("灰度线路或轨迹信息异常,请稍后再试")
// ToastUtils.showShort("灰度线路或轨迹信息异常,请稍后再试")
ToastUtils.showShort(R.string.module_och_query_routing_gray_line_error)
OchChainLogManager.writeChainLogRouting("[开始任务]","[开始任务] 灰度线路或轨迹信息异常,请稍后再试")
return
}

View File

@@ -96,7 +96,8 @@ class RoutingSelectView: ConstraintLayout, SwtichRoutingViewCallback, InputTextC
RoutingItemAdapter.LineItemClickListener {
override fun onItemClick(data: GrayLineBean) {
if(data.contrailId==null||data.contrailId!!<=0L){
ToastUtils.showShort("请设置轨迹信息")
// ToastUtils.showShort("请设置轨迹信息")
ToastUtils.showShort(R.string.module_och_please_set_trajectory_info)
}
OchChainLogManager.writeChainLogRouting("[选择灰度任务]","[选择灰度任务] 当前选择 ${data} ")
resetStatus()
@@ -255,7 +256,8 @@ class RoutingSelectView: ConstraintLayout, SwtichRoutingViewCallback, InputTextC
mRoutingLineList.clear()
mRoutingLineList.addAll(data)
mChooseLineListAdapter.notifyDataSetChanged()
ToastUtils.showShort("刷新成功")
// ToastUtils.showShort("刷新成功")
ToastUtils.showShort(R.string.module_och_please_refresh_success)
} else {
showEmptyView()
}

View File

@@ -226,7 +226,8 @@ class TaskRunningView : ConstraintLayout, TaskRunningModel.SwtichLineViewCallbac
* 服务完成
*/
override fun onSubmitEndTaskSuccess() {
ToastUtils.showLong("结束任务成功")
// ToastUtils.showLong("结束任务成功")
ToastUtils.showLong(R.string.module_och_task_finish_success)
RoutingServiceManager.invokeCallback(false)
// 移除高德导航计算距离
AmapNaviToDestinationModel.getInstance(context).destroyAmaNavi()

View File

@@ -271,7 +271,8 @@ class TaxiRunningView: ConstraintLayout, TaxiRunningModel.RoutingRuningCallback,
}
override fun onSubmitEndTaskSuccess() {
ToastUtils.showLong("结束任务成功")
// ToastUtils.showLong("结束任务成功")
ToastUtils.showLong(R.string.module_och_task_finish_success)
RoutingServiceManager.invokeCallback(false)
// 移除高德导航计算距离
AmapNaviToDestinationModel.getInstance(context).destroyAmaNavi()

View File

@@ -8,6 +8,7 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.bridge.R
import com.mogo.och.bridge.autopilot.OCHAdasAbilityManager
import com.mogo.och.bridge.autopilot.autopilot.bean.SessionWithTime
import com.mogo.och.bridge.autopilot.line.LineManager
@@ -52,7 +53,8 @@ object OchAutoPilotManager {
clearGlobalSessionId("检测session 自带的时间 ${currentTimeMillis}_${sessionInfo.setTime}_${sessionInfo.sessionId}")
return true
}else{
ToastUtils.showLong("自驾启动中,请勿重复点击")
// ToastUtils.showLong("自驾启动中,请勿重复点击")
ToastUtils.showLong(R.string.module_och_autopilot_starting_not_click)
OchAutopilotAnalytics.triggerCanStartAutopilotBySessionId(globalSessionId.get())
return false
}

View File

@@ -23,6 +23,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
import com.mogo.eagle.core.utilcode.util.StringUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.bridge.R
import com.mogo.och.common.module.constant.OchCommonConst
import com.mogo.och.bridge.autopilot.OCHAdasAbilityManager
import com.mogo.och.bridge.autopilot.autopilot.OchAutoPilotManager
@@ -456,7 +457,8 @@ object LineManager : CallerBase<ILineCallback>() {
}
CallerLogger.d(TAG, "${parameters?.wayLatLons}\n${parameters?.blackLatLons}")
if (parameters == null) {
ToastUtils.showShort("未设置起始或终点站点")
// ToastUtils.showShort("未设置起始或终点站点")
ToastUtils.showShort(R.string.module_och_not_stat_and_end_point)
}
return parameters
}
@@ -533,13 +535,15 @@ object LineManager : CallerBase<ILineCallback>() {
fun startAutopilot() {
if (startStation == null || endStation == null) {
ToastUtils.showShort("未设置起始或终点站点")
// ToastUtils.showShort("未设置起始或终点站点")
ToastUtils.showShort(R.string.module_och_not_stat_and_end_point)
return
}
startStation?.let {
if (!it.isLeaving) {
ToastUtils.showShort("请滑动出发后再启动自驾")
// ToastUtils.showShort("请滑动出发后再启动自驾")
ToastUtils.showShort(R.string.module_och_please_slide_hint)
return
}
}
@@ -555,14 +559,16 @@ object LineManager : CallerBase<ILineCallback>() {
//1、判断轨迹url是否可用
if (_contraiInfo == null) {
ToastUtils.showLong("无发布轨迹, 请发布后重试")
// ToastUtils.showLong("无发布轨迹, 请发布后重试")
ToastUtils.showLong(R.string.module_taxi_no_publication_trajectory)
return
} else {
if (FunctionBuildConfig.isPassStartAutopilotCommand
&& TextUtils.isEmpty(_contraiInfo!!.csvFileUrl)
&& TextUtils.isEmpty(_contraiInfo!!.csvFileMd5)
) {
ToastUtils.showLong("无发布轨迹, 请发布后重试")
// ToastUtils.showLong("无发布轨迹, 请发布后重试")
ToastUtils.showLong(R.string.module_taxi_no_publication_trajectory)
e(
TAG, "isPassStartAutopilotCommand = " +
FunctionBuildConfig.isPassStartAutopilotCommand
@@ -685,7 +691,8 @@ object LineManager : CallerBase<ILineCallback>() {
} else {
// 地盘有但是和och出不一样
// todo 需要och 重新出发轨迹下载操作
ToastUtils.showShort("${autopilotIdFromFsm}_${teleOrderId}_自动驾驶id不同请排查")
// ToastUtils.showShort("${autopilotIdFromFsm}_${teleOrderId}_自动驾驶id不同请排查")
ToastUtils.showShort(R.string.module_och_autopilot_id_diff, autopilotIdFromFsm, teleOrderId)
OchChainLogManager.writeChainLogAutopilot(
"自驾Id",
"${autopilotIdFromFsm}_${teleOrderId}_自动驾驶id不同请排查"

View File

@@ -12,6 +12,7 @@ import com.mogo.eagle.core.function.main.MainPresenter
import com.mogo.eagle.core.utilcode.mogo.permissions.PermissionsDialogUtils
import com.mogo.eagle.core.utilcode.util.ActivityUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.common.module.R
import com.mogo.och.common.module.utils.PermissionUtil
open class BaseBluetoothManager {
@@ -48,7 +49,8 @@ open class BaseBluetoothManager {
return BluetoothState.OFF
}
}
ToastUtils.showShort("设备无蓝牙硬件")
// ToastUtils.showShort("设备无蓝牙硬件")
ToastUtils.showShort(R.string.module_och_not_bluetooth)
return BluetoothState.NONE
}

View File

@@ -12,6 +12,7 @@ import android.bluetooth.BluetoothProfile
import android.util.Log
import com.mogo.commons.AbsMogoApplication
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.common.module.R
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
import com.mogo.och.common.module.utils.RxUtils
import io.reactivex.disposables.Disposable
@@ -190,7 +191,8 @@ class OchBluetoothGattCallback(device: BluetoothDevice) : BluetoothGattCallback(
return null
}
val service = mBluetoothGatt!!.getService(uuid)
if (service == null) ToastUtils.showShort("没有找到服务UUID=$uuid")
// if (service == null) ToastUtils.showShort("没有找到服务UUID=$uuid")
if (service == null) ToastUtils.showShort(R.string.module_och_bluetooth_not_find_uuid, "$uuid")
return service
}
@@ -223,7 +225,8 @@ class OchBluetoothGattCallback(device: BluetoothDevice) : BluetoothGattCallback(
fun connectGattAndSend(data: String) {
RxUtils.disposeSubscribe(timeoutCLose)
if(isConnected){
ToastUtils.showShort("已连接成功")
// ToastUtils.showShort("已连接成功")
ToastUtils.showShort(R.string.module_och_bluetooth_connected)
OchChainLogManager.writeChainLogWriteOff("司机端核销成功","已连接成功")
waitSendData[data] = BleManager.UUID_CHAR_WRITE
sendData()

View File

@@ -43,7 +43,8 @@ class DebugViewWatchDogFragment :
actv_password_submit.setOnClickListener {
val text = acet_close.text
if(text==null||text.isEmpty()){
ToastCharterUtils.showToastShort("请输入密码")
// ToastCharterUtils.showToastShort("请输入密码")
ToastCharterUtils.showToastShort(R.string.module_och_input_pwd)
}else{
if(text.toString() == "123987"){
dismissAllowingStateLoss()
@@ -52,7 +53,8 @@ class DebugViewWatchDogFragment :
}
ToggleDebugView.toggleDebugView.toggle(requireContext())
}else{
ToastCharterUtils.showToastShort("请输入正确密码")
// ToastCharterUtils.showToastShort("请输入正确密码")
ToastCharterUtils.showToastShort(R.string.module_och_input_pwd_error)
}
}
}

View File

@@ -9,6 +9,8 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i
import com.mogo.eagle.core.utilcode.util.NetworkUtils
import com.mogo.eagle.core.utilcode.util.StringUtils
import com.mogo.och.common.module.R
import com.mogo.och.common.module.utils.PermissionUtil
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils
import io.reactivex.Observable
@@ -36,9 +38,11 @@ object AbnormalFactorsLoopManager : IMogoStatusChangedListener {
return@observable
}
if (newValue) {
ToastCharterUtils.showToastLong("长链接状态恢复")
// ToastCharterUtils.showToastLong("长链接状态恢复")
ToastCharterUtils.showToastLong(R.string.module_och_long_link_status_restored)
} else {
ToastCharterUtils.showToastLong("长链接异常,请开启相应权限或者查看网络")
// ToastCharterUtils.showToastLong("长链接异常,请开启相应权限或者查看网络")
ToastCharterUtils.showToastLong(R.string.module_och_long_link_error)
}
}
@@ -82,13 +86,16 @@ object AbnormalFactorsLoopManager : IMogoStatusChangedListener {
//长链接状态 socketStatus
var toastStr = ""
if (!locationStatusPermsStatus) toastStr += "定位服务异常 "
if (!networkStatus) toastStr += " 网络异常 "
// if (!locationStatusPermsStatus) toastStr += "定位服务异常 "
if (!locationStatusPermsStatus) toastStr += StringUtils.getString(R.string.module_och_location_service_error)
// if (!networkStatus) toastStr += " 网络异常 "
if (!networkStatus) toastStr += StringUtils.getString(R.string.module_och_network_service_error)
i(TAG, "abnormal_factors_Str = $toastStr")
if (!FunctionBuildConfig.isDemoMode && toastStr !== "") {
ToastCharterUtils.showToastLong(toastStr + "请开启相应权限或者查看网络")
// ToastCharterUtils.showToastLong(toastStr + "请开启相应权限或者查看网络")
ToastCharterUtils.showToastLong(R.string.module_och_please_open_permission, toastStr)
}
}

View File

@@ -13,6 +13,7 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.permissions.PermissionsDialogUtils
import com.mogo.eagle.core.utilcode.util.ActivityUtils
import com.mogo.och.common.module.R
import com.mogo.och.common.module.utils.PermissionUtil
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils
import com.mogo.tts.base.zhi.AsrTextBean
@@ -165,7 +166,8 @@ object ZhiStateManager : ZhiRecordWinUi {
return
}
if (!isFastClick()) {
ToastCharterUtils.showToastShort("请稍后唤醒")
// ToastCharterUtils.showToastShort("请稍后唤醒")
ToastCharterUtils.showToastShort(R.string.module_och_please_wait_wake_up)
return
}
if (PermissionUtil.checkPermission(AbsMogoApplication.getApp(), Manifest.permission.RECORD_AUDIO)) {

View File

@@ -26,6 +26,7 @@ import com.mogo.commons.AbsMogoApplication;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
import com.mogo.och.common.module.R;
import com.mogo.och.common.module.utils.PermissionUtil;
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils;
@@ -175,14 +176,16 @@ public class AmapNaviToDestinationModel implements AMapNaviListener {
}
}
if (!NetworkUtils.isConnected(AbsMogoApplication.getApp()) || result.getErrorCode() == 2) {
ToastCharterUtils.showToastShort("网络异常,请重试");
// ToastCharterUtils.showToastShort("网络异常,请重试");
ToastCharterUtils.showToastShort(R.string.module_och_network_error_retry);
if (mNaviChangedCallback != null) {
mNaviChangedCallback.reInitNaviAmap(isPlay, false);
}
return;
}
if (!PermissionUtil.isLocServiceEnable(AbsMogoApplication.getApp()) || !PermissionUtil.checkPermission(AbsMogoApplication.getApp(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION})) {
ToastCharterUtils.showToastShort("请开启车机定位后重试");
// ToastCharterUtils.showToastShort("请开启车机定位后重试");
ToastCharterUtils.showToastShort(R.string.module_och_open_location_permission_retry);
if (mNaviChangedCallback != null) {
mNaviChangedCallback.reInitNaviAmap(isPlay, false);
}

View File

@@ -4,6 +4,7 @@ import android.content.Context;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
import com.mogo.och.common.module.R;
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils;
public class ToastUtilsOch {
@@ -36,7 +37,8 @@ public class ToastUtilsOch {
public static void toastRequestError(Context context,String failMsg){
if (!NetworkUtils.isConnected(context)) {
ToastCharterUtils.showToastShort("网络异常,请稍后重试");
// ToastCharterUtils.showToastShort("网络异常,请稍后重试");
ToastCharterUtils.showToastShort(R.string.module_och_network_error_retry1);
}else {
ToastCharterUtils.showToastShort(failMsg);
}

View File

@@ -23,7 +23,8 @@ class CommonFeedbackDialog : BaseFloatDialog, LifecycleObserver {
private var listener:Listener?=null
private var mRunnable:Runnable= Runnable {
ToastUtils.showLong("超时未响应,请求失败")
// ToastUtils.showLong("超时未响应,请求失败")
ToastUtils.showLong(R.string.module_och_timeout)
}
constructor(builder: Builder, context: Context) : super(context) {

View File

@@ -30,6 +30,22 @@ object ToastCharterUtils {
}, UiThreadHandler.MODE.QUEUE)
}
@JvmStatic
fun showToastLong(@StringRes resId: Int) {
val string = StringUtils.getString(resId)
string?.let {
showToastLong(it)
}
}
@JvmStatic
fun showToastLong(@StringRes resId: Int, vararg args: Any?) {
val string = StringUtils.getString(resId, args)
string?.let {
showToastLong(it)
}
}
@JvmStatic
fun showToastShort(toastText: String?){
CallerLogger.d(SceneConstant.M_OCHCOMMON + TAG,"showToastShort吐司内容${toastText}")
@@ -60,6 +76,12 @@ object ToastCharterUtils {
}
fun showCharterLongToast(@StringRes resId: Int) {
val string = StringUtils.getString(resId)
string?.let {
showCharterLongToast(it)
}
}
fun showCharterLongToast(toastText: String) {
val context = ActivityUtils.getTopActivity()
val marker = ToastCharterView(context)

View File

@@ -198,7 +198,8 @@ object LineModel {
}
if (!isBackground) {
if (!NetworkUtils.isConnected(AbsMogoApplication.getApp())) {
ToastUtils.showShort("网络异常,请稍后重试")
// ToastUtils.showShort("网络异常,请稍后重试")
ToastUtils.showShort(R.string.module_och_network_error)
} else {
ToastUtils.showShort(failMsg)
}
@@ -293,7 +294,8 @@ object LineModel {
d(TAG, "commitSwitchLineId onError${e.printStackTrace()}")
if (e is DataException) {
OchChainLogManager.writeChainLog("开始任务", "${e.message}")
ToastUtils.showShort("选择任务失败:${e.message}")
// ToastUtils.showShort("选择任务失败:${e.message}")
ToastUtils.showShort(R.string.module_och_choose_task_fail, e.message)
mBusLinesCallbackMap.forEach {
it.value.onChangeLineIdFail()
}

View File

@@ -12,6 +12,7 @@ import com.mogo.och.data.bean.BusStationBean
import com.mogo.och.data.bean.ContraiInfo
import com.mogo.och.data.bean.LineInfo
import com.mogo.och.data.bean.SiteIntroduce
import com.mogo.och.offline.R
import com.mogo.och.offline.repository.db.bean.LineDataBean
import com.mogo.och.offline.model.LineModel
import com.mogo.och.offline.model.LineModel.currentTask
@@ -100,7 +101,8 @@ object RepositoryManager {
currentTask?.lineId?.let {
ContraiDb.queryAutopilotInfoByLineid(it)?.apply {
if (lineId == null || lineId!! < 0L||csvFileUrl.isNullOrEmpty()||csvFileMd5.isNullOrEmpty()||txtFileUrl.isNullOrEmpty()||txtFileMd5.isNullOrEmpty()) {
ToastUtils.showLong("请设置轨迹信息")
// ToastUtils.showLong("请设置轨迹信息")
ToastUtils.showLong(R.string.module_och_set_line_info)
OchChainLogManager.writeChainLogAutopilot("轨迹错误",this.toString())
CallerLogger.d(TAG,"轨迹错误,$this")
}

View File

@@ -7,6 +7,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.common.module.utils.DateTimeUtil
import com.mogo.och.common.module.utils.RxUtils
import com.mogo.och.offline.R
import com.mogo.och.offline.repository.db.bean.LineDataBean
import com.mogo.och.offline.callback.IBusLinesCallback
import com.mogo.och.offline.model.LineModel
@@ -86,7 +87,8 @@ class SwtichLineModel : ViewModel(), IBusLinesCallback {
fun changeLineStart(checkTask:LineDataBean) {
if(checkTask==null){
ToastUtils.showShort("请重新选择线路")
// ToastUtils.showShort("请重新选择线路")
ToastUtils.showShort(R.string.module_och_please_choose_line)
return
}
val newTask = TaskDataBean()

View File

@@ -130,14 +130,16 @@ object LineModel {
if(RepositoryManager.supportDb()) {
if (e is DataException) {
OchChainLogManager.writeChainLog("开始任务", "${e.message}")
ToastUtils.showShort("选择任务失败:${e.message}")
// ToastUtils.showShort("选择任务失败:${e.message}")
ToastUtils.showShort(R.string.module_och_choose_task_fail, e.message)
mBusLinesCallbackMap.forEach {
it.value.onChangeLineIdFail()
}
}
}else{
OchChainLogManager.writeChainLog("开始任务", "${e.message}")
ToastUtils.showShort("选择任务失败:${e.message}")
// ToastUtils.showShort("选择任务失败:${e.message}")
ToastUtils.showShort(R.string.module_och_choose_task_fail, e.message)
mBusLinesCallbackMap.forEach {
it.value.onChangeLineIdFail()
}
@@ -261,7 +263,8 @@ object LineModel {
"taskId:${currentTask?.taskId}--lineInfo:${LineManager.lineInfos}"
OchChainLogManager.writeChainLog("结束任务", changeInfo)
} else {
ToastUtils.showShort("结束任务失败请稍后再试")
// ToastUtils.showShort("结束任务失败请稍后再试")
ToastUtils.showShort(R.string.module_och_task_finish_fail)
mBusLinesCallbackMap.forEach {
it.value.onCompleteTaskFail()
}

View File

@@ -117,7 +117,8 @@ object SynchDataModel {
}
if (!isBackground) {
if (!NetworkUtils.isConnected(AbsMogoApplication.getApp())) {
ToastUtils.showShort("网络异常,请稍后重试")
// ToastUtils.showShort("网络异常,请稍后重试")
ToastUtils.showShort(R.string.module_och_network_error)
} else {
ToastUtils.showShort(failMsg)
}

View File

@@ -16,6 +16,7 @@ import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
import com.mogo.och.common.module.network.OchCommonServiceCallback
import com.mogo.och.common.module.utils.DateTimeUtil
import com.mogo.och.data.bean.ContraiInfo
import com.mogo.och.shuttle.weaknet.R
import com.mogo.och.weaknet.bean.request.QueryPointRequest
import com.mogo.och.weaknet.bean.request.ShuttleEventRequest
import com.mogo.och.weaknet.bean.response.BusRoutesResponse
@@ -122,7 +123,8 @@ class WeaknetRepository : ILineRepository {
currentTask?.lineId?.let {
ContraiDb.queryAutopilotInfoByLineid(it)?.apply {
if (lineId == null || lineId!! < 0L||csvFileUrl.isNullOrEmpty()||csvFileMd5.isNullOrEmpty()||txtFileUrl.isNullOrEmpty()||txtFileMd5.isNullOrEmpty()) {
ToastUtils.showLong("请设置轨迹信息")
// ToastUtils.showLong("请设置轨迹信息")
ToastUtils.showLong(R.string.module_och_set_line_info)
OchChainLogManager.writeChainLogAutopilot("轨迹错误",this.toString())
CallerLogger.d(TAG,"轨迹错误,$this")
}

View File

@@ -72,14 +72,17 @@ class SwitchTaskView: WindowRelativeLayout, SwtichTaskModel.SwtichLineViewCallba
actv_submit_task.onClick {
val tempCheckTask = mAdapter.getCheckTask()
if(tempCheckTask==null){
ToastUtils.showShort("请选择任务")
// ToastUtils.showShort("请选择任务")
ToastUtils.showShort(R.string.module_och_please_choose_task)
}else{
if(tempCheckTask.status == TaskDataBean.used){
val reason = tempData[tempCheckTask.taskId]
if(reason==null){
ToastUtils.showShort("该任务已被其他车辆使用、请切换任务")
// ToastUtils.showShort("该任务已被其他车辆使用、请切换任务")
ToastUtils.showShort(R.string.module_och_this_task_not_use)
}else{
ToastUtils.showShort("该任务已被${reason}使用、请切换任务")
// ToastUtils.showShort("该任务已被${reason}使用、请切换任务")
ToastUtils.showShort(R.string.module_och_this_task_not_use1, reason)
}
}else {
viewModel?.changeLineStart(tempCheckTask)

View File

@@ -7,6 +7,7 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.common.module.manager.loop.BizLoopManager
import com.mogo.och.common.module.utils.RxUtils
import com.mogo.och.shuttle.weaknet.R
import com.mogo.och.weaknet.callback.IBusLinesCallback
import com.mogo.och.weaknet.model.LineModel
import com.mogo.och.weaknet.repository.RepositoryManager
@@ -116,7 +117,8 @@ class SwtichTaskModel : ViewModel(), IBusLinesCallback {
fun changeLineStart(checkTask:TaskDataBean) {
if(tasksBelongLine==null){
ToastUtils.showShort("请重新选择线路")
// ToastUtils.showShort("请重新选择线路")
ToastUtils.showShort(R.string.module_och_please_choose_line)
return
}
viewCallback?.showLoading()

View File

@@ -404,7 +404,8 @@ public class SweeperOperateTaskModel {
&& TextUtils.isEmpty(mCurrentSubTaskDetail.getCsvFileUrl())
&& TextUtils.isEmpty(mCurrentSubTaskDetail.getCsvFileUrlDPQP())
) {
ToastUtils.showLong("无发布轨迹, 请发布后重试");
// ToastUtils.showLong("无发布轨迹, 请发布后重试");
ToastUtils.showLong(R.string.module_taxi_no_publication_trajectory);
CallerLogger.e(
TAG, "isPassStartAutopilotCommand = " +
FunctionBuildConfig.isPassStartAutopilotCommand
@@ -605,7 +606,8 @@ public class SweeperOperateTaskModel {
public void onFail(int code, String msg) {
if (ToastUtilsOch.isCustomFastClick(5000)) {
if (!NetworkUtils.isConnected(mContext)) {
ToastUtils.showShort("网络异常,请稍后重试");
// ToastUtils.showShort("网络异常,请稍后重试");
ToastUtils.showShort(R.string.module_och_network_error);
DebugView.Companion.printErrorMsg("[查询当前任务] 请求failed, 网络异常,请稍后重试");
} else {
ToastUtils.showShort(msg);
@@ -636,7 +638,8 @@ public class SweeperOperateTaskModel {
public void onFail(int code, String msg) {
if (ToastUtilsOch.isCustomFastClick(5000)) {
if (!NetworkUtils.isConnected(mContext)) {
ToastUtils.showShort("网络异常,请稍后重试");
// ToastUtils.showShort("网络异常,请稍后重试");
ToastUtils.showShort(R.string.module_och_network_error);
DebugView.Companion.printErrorMsg("[查询主任务] 请求error, 网络异常,请稍后重试");
} else {
ToastUtils.showShort(msg);
@@ -683,7 +686,8 @@ public class SweeperOperateTaskModel {
public void onFail(int code, String msg) {
if (ToastUtilsOch.isCustomFastClick(5000)) {
if (!NetworkUtils.isConnected(mContext)) {
ToastUtils.showShort("网络异常,请稍后重试");
// ToastUtils.showShort("网络异常,请稍后重试");
ToastUtils.showShort(R.string.module_och_network_error);
DebugView.Companion.printErrorMsg("[查询子任务] 请求failed, 网络异常,请稍后重试, taskId=" + taskId);
} else {
ToastUtils.showShort(msg);
@@ -748,7 +752,8 @@ public class SweeperOperateTaskModel {
public void onFail(int code, String msg) {
if (ToastUtilsOch.isCustomFastClick(5000)) {
if (!NetworkUtils.isConnected(mContext)) {
ToastUtils.showShort("网络异常,请稍后重试");
// ToastUtils.showShort("网络异常,请稍后重试");
ToastUtils.showShort(R.string.module_och_network_error);
DebugView.Companion.printErrorMsg("[查询子任务详情及轨迹信息] 请求failed, 网络异常,请稍后重试, isFirst=" + isFirst + ", isEnd=" + isEnd + ", subTaskId=" + subTaskId);
} else {
ToastUtils.showShort(msg);
@@ -804,7 +809,8 @@ public class SweeperOperateTaskModel {
public void onFail(int code, String msg) {
if (ToastUtilsOch.isCustomFastClick(5000)) {
if (!NetworkUtils.isConnected(mContext)) {
ToastUtils.showShort("网络异常,请稍后重试");
// ToastUtils.showShort("网络异常,请稍后重试");
ToastUtils.showShort(R.string.module_och_network_error);
DebugView.Companion.printErrorMsg("[子任务开始上报] 请求failed, 网络异常,请稍后重试, isFirst=" + isFirst + ", isEnd=" + isEnd + ", subTaskId=" + subTaskId);
} else {
ToastUtils.showShort(msg);
@@ -859,7 +865,8 @@ public class SweeperOperateTaskModel {
public void onFail(int code, String msg) {
if (ToastUtilsOch.isCustomFastClick(5000)) {
if (!NetworkUtils.isConnected(mContext)) {
ToastUtils.showShort("网络异常,请稍后重试");
// ToastUtils.showShort("网络异常,请稍后重试");
ToastUtils.showShort(R.string.module_och_network_error);
DebugView.Companion.printErrorMsg("[子任务结束上报] 请求failed, 网络异常,请稍后重试, isFirst=" + isFirst + ", isEnd=" + isEnd + ", subTaskId=" + subTaskId);
} else {
if (isAutopilotSubTaskArriveEndSite) return;
@@ -908,7 +915,8 @@ public class SweeperOperateTaskModel {
public void onFail(int code, String msg) {
if (ToastUtilsOch.isCustomFastClick(5000)) {
if (!NetworkUtils.isConnected(mContext)) {
ToastUtils.showShort("网络异常,请稍后重试");
// ToastUtils.showShort("网络异常,请稍后重试");
ToastUtils.showShort(R.string.module_och_network_error);
DebugView.Companion.printErrorMsg("[子任务跳过上报] 请求failed, 网络异常,请稍后重试, isFirst=" + isFirst + ", isEnd=" + isEnd + ", subTaskId=" + subTaskId);
} else {
ToastUtils.showShort(msg);
@@ -952,7 +960,8 @@ public class SweeperOperateTaskModel {
public void onFail(int code, String msg) {
if (ToastUtilsOch.isCustomFastClick(5000)) {
if (!NetworkUtils.isConnected(mContext)) {
ToastUtils.showShort("网络异常,请稍后重试");
// ToastUtils.showShort("网络异常,请稍后重试");
ToastUtils.showShort(R.string.module_och_network_error);
DebugView.Companion.printErrorMsg("[主任务重置] 请求failed, 网络异常,请稍后重试, taskId=" + taskId);
} else {
ToastUtils.showShort(msg);

View File

@@ -1252,7 +1252,8 @@ object TaxiTaskModel {
&& TextUtils.isEmpty(mCurrentTaskTrajectory!!.csvFileUrl)
&& TextUtils.isEmpty(mCurrentTaskTrajectory!!.csvFileUrlDPQP)
) {
ToastUtils.showLong("无发布轨迹, 请发布后重试")
// ToastUtils.showLong("无发布轨迹, 请发布后重试")
ToastUtils.showLong(R.string.module_taxi_no_publication_trajectory)
DebugView.printErrorMsg("[启自驾] 无发布轨迹, 请发布后重试")
e(
TAG, "isPassStartAutopilotCommand = " +

View File

@@ -78,7 +78,8 @@ class CancleOrderView : WindowRelativeLayout, CancleOrderViewModel.CancleOrderVi
tv_report_cancle_reason.onClick {
val checkDataList = cancleOrderItemAdapter.getCheckDataList()
if (checkDataList.isEmpty()) {
ToastUtils.showShort("请选择问题类型")
// ToastUtils.showShort("请选择问题类型")
ToastUtils.showShort(R.string.module_mogo_core_function_devatools_choose_issue_type)
return@onClick
}
tv_report_cancle_reason_cancel.isEnabled = false

View File

@@ -23,6 +23,7 @@ import com.mogo.och.data.taxi.TaxiOrderStatusEnum
import com.mogo.och.unmanned.passenger.bean.TaxiPassengerBaseRespBean
import com.mogo.och.unmanned.passenger.constant.TaxiPassengerConst
import com.mogo.och.unmanned.passenger.network.TaxiPassengerServiceManager
import com.mogo.och.unmanned.taxi.passenger.R
object AutopilotManager : IOchAutopilotStatusListener {
@@ -68,7 +69,8 @@ object AutopilotManager : IOchAutopilotStatusListener {
&& TextUtils.isEmpty(it.csvFileUrl)
&& TextUtils.isEmpty(it.csvFileUrlDPQP)
) {
ToastUtils.showLong("无发布轨迹, 请发布后重试")
// ToastUtils.showLong("无发布轨迹, 请发布后重试")
ToastUtils.showLong(R.string.module_taxi_no_publication_trajectory)
CallerLogger.e(
TAG, "isPassStartAutopilotCommand = " +
FunctionBuildConfig.isPassStartAutopilotCommand

View File

@@ -15,6 +15,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.unmanned.passenger.ui.aiview.AIMessageManager
import com.mogo.och.unmanned.passenger.ui.aiview.bean.AIMessage
import com.mogo.och.unmanned.taxi.passenger.R
class RoadCrossRoamViewModel: ViewModel(), IMoGoMapRoadListener {
@@ -45,7 +46,8 @@ class RoadCrossRoamViewModel: ViewModel(), IMoGoMapRoadListener {
// 处于漫游模式下不做处理
if (CallerMapIdentifyManager.roam.second) {
if (CallerMapIdentifyManager.roam.first != TAG) {
ToastUtils.showLong("正在漫游中,不展示路口漫游")
// ToastUtils.showLong("正在漫游中,不展示路口漫游")
ToastUtils.showLong(R.string.module_mogo_core_function_roam_now)
}
CallerLogger.d(TAG, "正在漫游中,不展示路口漫游")
return