Merge branch 'dev_robotaxi-d_240516_6.4.2' into 'master'
[Publish] V6.4.2 See merge request SCA/L4HA/AndroidApp/MoGoEagleEye!866
This commit is contained in:
@@ -16,6 +16,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
import com.mogo.eagle.core.utilcode.util.KeyboardUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.biz.BuildConfig
|
||||
import com.mogo.och.biz.R
|
||||
import com.mogo.och.biz.login.callback.ILoginViewCallback
|
||||
import com.mogo.och.biz.login.presenter.LoginPresenter
|
||||
@@ -117,9 +118,11 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
||||
}
|
||||
}
|
||||
biz_actv_login_show_sn.text = SharedPrefsMgr.getInstance().sn
|
||||
biz_actv_login_show_sn.setOnLongClickListener {
|
||||
bv_switch_business.selectBusniess()
|
||||
true
|
||||
if(BuildConfig.DEBUG) {
|
||||
biz_actv_login_show_sn.setOnLongClickListener {
|
||||
bv_switch_business.selectBusniess()
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,11 +63,11 @@ class LoginPassengerFragment : MvpFragment<LoginPassengerFragment?, LoginPasseng
|
||||
|
||||
actv_app_version?.text = FlavorUtils.getInfo()
|
||||
|
||||
actv_app_version?.setOnLongClickListener {
|
||||
if(BuildConfig.DEBUG){
|
||||
if(BuildConfig.DEBUG) {
|
||||
actv_app_version?.setOnLongClickListener {
|
||||
bv_switch_business?.selectBusniess()
|
||||
true
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
CallerLogger.d(TAG, "init")
|
||||
|
||||
@@ -7,6 +7,7 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.och.biz.R
|
||||
import com.mogo.och.common.module.biz.login.BusinessEnum
|
||||
@@ -15,6 +16,7 @@ import kotlinx.android.synthetic.main.biz_login_business_view.view.actv_business
|
||||
import kotlinx.android.synthetic.main.biz_login_business_view.view.actv_business_charter
|
||||
import kotlinx.android.synthetic.main.biz_login_business_view.view.actv_business_shuttle
|
||||
import kotlinx.android.synthetic.main.biz_login_business_view.view.actv_business_taxi
|
||||
import kotlinx.android.synthetic.main.biz_login_business_view.view.actv_debugview
|
||||
|
||||
|
||||
class BusinessView : ConstraintLayout, BusinessViewModel.IErrorInfoViewCallback {
|
||||
@@ -25,9 +27,18 @@ class BusinessView : ConstraintLayout, BusinessViewModel.IErrorInfoViewCallback
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet) : super(context, attributeSet)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int) : super(context, attributeSet, defStyleAttr)
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int) : super(
|
||||
context,
|
||||
attributeSet,
|
||||
defStyleAttr
|
||||
)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attributeSet, defStyleAttr, defStyleRes)
|
||||
constructor(
|
||||
context: Context,
|
||||
attributeSet: AttributeSet,
|
||||
defStyleAttr: Int,
|
||||
defStyleRes: Int
|
||||
) : super(context, attributeSet, defStyleAttr, defStyleRes)
|
||||
|
||||
private var viewModel: BusinessViewModel? = null
|
||||
private fun initView() {
|
||||
@@ -48,9 +59,10 @@ class BusinessView : ConstraintLayout, BusinessViewModel.IErrorInfoViewCallback
|
||||
actv_business_bus.onClick { swtichBusiness(BusinessEnum.Bus) }
|
||||
actv_business_taxi.onClick { swtichBusiness(BusinessEnum.Taxi) }
|
||||
actv_business_charter.onClick { swtichBusiness(BusinessEnum.Charter) }
|
||||
actv_debugview.onClick { ToggleDebugView.toggleDebugView.toggle(context) }
|
||||
}
|
||||
|
||||
private fun swtichBusiness(businessEnum: BusinessEnum){
|
||||
private fun swtichBusiness(businessEnum: BusinessEnum) {
|
||||
LoginStatusManager.invokeLBusinessTypeChangeDebug(businessEnum)
|
||||
visibility = GONE
|
||||
}
|
||||
@@ -58,62 +70,38 @@ class BusinessView : ConstraintLayout, BusinessViewModel.IErrorInfoViewCallback
|
||||
|
||||
override fun onVisibilityAggregated(isVisible: Boolean) {
|
||||
super.onVisibilityAggregated(isVisible)
|
||||
if(isVisible){
|
||||
if (isVisible) {
|
||||
|
||||
}else{
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun selectBusniess(){
|
||||
if(FunctionBuildConfig.supportBusiness.size==1){
|
||||
FunctionBuildConfig.supportBusiness.forEach {
|
||||
when (it) {
|
||||
"shuttle" -> {
|
||||
swtichBusiness(BusinessEnum.Shuttle)
|
||||
}
|
||||
|
||||
"bus" -> {
|
||||
swtichBusiness(BusinessEnum.Bus)
|
||||
}
|
||||
|
||||
"taxi" -> {
|
||||
swtichBusiness(BusinessEnum.Taxi)
|
||||
}
|
||||
|
||||
"charter" -> {
|
||||
swtichBusiness(BusinessEnum.Charter)
|
||||
}
|
||||
|
||||
else -> {}
|
||||
fun selectBusniess() {
|
||||
visibility = VISIBLE
|
||||
actv_business_shuttle.visibility = GONE
|
||||
actv_business_bus.visibility = GONE
|
||||
actv_business_taxi.visibility = GONE
|
||||
actv_business_charter.visibility = GONE
|
||||
FunctionBuildConfig.supportBusiness.forEach {
|
||||
when (it) {
|
||||
"shuttle" -> {
|
||||
actv_business_shuttle.visibility = VISIBLE
|
||||
}
|
||||
}
|
||||
}else {
|
||||
visibility = VISIBLE
|
||||
actv_business_shuttle.visibility = GONE
|
||||
actv_business_bus.visibility = GONE
|
||||
actv_business_taxi.visibility = GONE
|
||||
actv_business_charter.visibility = GONE
|
||||
FunctionBuildConfig.supportBusiness.forEach {
|
||||
when (it) {
|
||||
"shuttle" -> {
|
||||
actv_business_shuttle.visibility = VISIBLE
|
||||
}
|
||||
|
||||
"bus" -> {
|
||||
actv_business_bus.visibility = VISIBLE
|
||||
}
|
||||
|
||||
"taxi" -> {
|
||||
actv_business_taxi.visibility = VISIBLE
|
||||
}
|
||||
|
||||
"charter" -> {
|
||||
actv_business_charter.visibility = VISIBLE
|
||||
}
|
||||
|
||||
else -> {}
|
||||
"bus" -> {
|
||||
actv_business_bus.visibility = VISIBLE
|
||||
}
|
||||
|
||||
"taxi" -> {
|
||||
actv_business_taxi.visibility = VISIBLE
|
||||
}
|
||||
|
||||
"charter" -> {
|
||||
actv_business_charter.visibility = VISIBLE
|
||||
}
|
||||
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_200"
|
||||
android:layout_height="@dimen/dp_300"
|
||||
android:layout_height="@dimen/dp_400"
|
||||
android:background="@drawable/biz_login_error_info">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
@@ -57,10 +57,23 @@
|
||||
android:gravity="center"
|
||||
android:text="出租车模式"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/actv_debugview"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_business_shuttle" />
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_debugview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_20"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
android:gravity="center"
|
||||
android:text="调试页面"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_business_taxi" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.mogo.och.common.module
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/4/26
|
||||
*/
|
||||
class OchCommonApi private constructor(){
|
||||
companion object{
|
||||
private var instance: OchCommonApi? = null
|
||||
get() {
|
||||
if (field == null){
|
||||
field = OchCommonApi();
|
||||
}
|
||||
return field
|
||||
}
|
||||
@Synchronized
|
||||
fun get():OchCommonApi{
|
||||
return instance!!
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.mogo.och.common.module.wigets
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.animation.LinearInterpolator
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.map.listener.IMogoMapListener
|
||||
import com.mogo.map.listener.MogoMapListenerHandler
|
||||
import com.mogo.map.uicontroller.EnumMapUI
|
||||
import com.mogo.och.common.module.R
|
||||
import kotlinx.android.synthetic.main.common_loading_map.view.aciv_loading_map
|
||||
|
||||
class CommonLoadingView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr),IMogoMapListener {
|
||||
companion object {
|
||||
const val TAG = "LoadingMapStatusView"
|
||||
}
|
||||
|
||||
private var autopilotLoadingAnimator: ObjectAnimator? = null
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.common_loading_map, this, true)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerLogger.d(TAG,"onAttachedToWindow")
|
||||
visibility = VISIBLE
|
||||
MogoMapListenerHandler.mogoMapListenerHandler.registerHostMapListener(TAG,this)
|
||||
if (autopilotLoadingAnimator == null) {
|
||||
autopilotLoadingAnimator =
|
||||
ObjectAnimator.ofFloat(aciv_loading_map, "rotation", 0f, 360f)
|
||||
autopilotLoadingAnimator?.setInterpolator(LinearInterpolator())
|
||||
autopilotLoadingAnimator?.setRepeatCount(-1) //无限循环
|
||||
autopilotLoadingAnimator?.setDuration(1000) //设置持续时间
|
||||
}
|
||||
autopilotLoadingAnimator!!.start() //动画开始
|
||||
|
||||
setOnClickListener {
|
||||
CallerLogger.d(TAG,"点击")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onMapLoaded() {
|
||||
MogoStatusManager.getInstance().setScreenCoverMode(TAG, true)
|
||||
HdMapBuildConfig.isMapLoaded = true
|
||||
// 设置地图样式
|
||||
MogoMapListenerHandler.mogoMapListenerHandler.onMapModeChanged(EnumMapUI.MAP_STYLE_DAY_VR)
|
||||
UiThreadHandler.postDelayed({ visibility = GONE },2_000,UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerLogger.d(TAG,"onDetachedFromWindow")
|
||||
MogoMapListenerHandler.mogoMapListenerHandler.unregisterHostMapListener(TAG)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.taxi.passenger.widget
|
||||
package com.mogo.och.common.module.wigets
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
22
OCH/common/common/src/main/res/layout/common_loading.xml
Normal file
22
OCH/common/common/src/main/res/layout/common_loading.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dialog_loading_view"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:src="@drawable/common_loading_nor" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dialog_loading_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="请求中,请稍后..."
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:layout_marginTop="@dimen/dp_10"/>
|
||||
</LinearLayout>
|
||||
@@ -500,6 +500,9 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
|
||||
@Override
|
||||
public void onOpenOrderStatusEnumChange(OpenOrderStatusEnum businessEnum) {
|
||||
if(businessEnum==OpenOrderStatusEnum.Ordering){
|
||||
TaxiModel.getInstance().startOrStopOrderLoop(LoginStatusManager.isLogin()&&LoginStatusManager.isOpenOrderType());
|
||||
}
|
||||
UiThreadHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -56,6 +56,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.amapnavi3dmap
|
||||
implementation rootProject.ext.dependencies.flexbox
|
||||
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
|
||||
|
||||
|
||||
@@ -45,13 +45,24 @@ data class StartGrayContrailTaskReq(var sn: String, var contrailId: Long)
|
||||
data class StartGrayContrailTaskRsp(var data: Long?) : BaseData()
|
||||
data class QueryRoutingContrailByIdRsp(var data: ContrailBean?) : BaseData()
|
||||
data class SubmitGrayLineIssueLocationReq(var grayId: Long, var gcjLon: Double, var gcjLat: Double)
|
||||
data class EndGrayContrailTaskReq(var grayId: Long, var feedback: Int) //feedback 1:成功 2:失败
|
||||
data class EndGrayContrailTaskReq(var grayId: Long, var feedback: Int,var occurrenceTime:Long) //feedback 1:成功 2:失败
|
||||
data class StartGrayAndQueryContrailRsp(
|
||||
var taskId: Long?,
|
||||
var contrail: ContrailBean?,
|
||||
var grayLineBean: GrayLineBean
|
||||
) : BaseData()
|
||||
data class PointError(var code:String,var name:String,var isCheck:Boolean = false)
|
||||
|
||||
data class QueryPointErrorReasonsRsp(var data: MutableList<PointError>?) : BaseData()
|
||||
data class SaveGrayContrailErrorReasons(
|
||||
var grayId: Long,
|
||||
var gcjLon: Double,
|
||||
var gcjLat: Double,
|
||||
var wgs84Lon: Double,
|
||||
var wgs84Lat: Double,
|
||||
var occurrenceTime:Long,
|
||||
var noteCodes: MutableList<String>,
|
||||
) //feedback 1:成功 2:失败
|
||||
enum class EndGrayTaskFeedbackType(var type: Int) {
|
||||
USABLE_YES(1),
|
||||
USABLE_NO(2)
|
||||
|
||||
@@ -5,7 +5,9 @@ import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.och.taxi.bean.EndGrayContrailTaskReq
|
||||
import com.mogo.och.taxi.bean.QueryGrayContrailListRsp
|
||||
import com.mogo.och.taxi.bean.QueryPointErrorReasonsRsp
|
||||
import com.mogo.och.taxi.bean.QueryRoutingContrailByIdRsp
|
||||
import com.mogo.och.taxi.bean.SaveGrayContrailErrorReasons
|
||||
import com.mogo.och.taxi.bean.StartGrayContrailTaskReq
|
||||
import com.mogo.och.taxi.bean.StartGrayContrailTaskRsp
|
||||
import com.mogo.och.taxi.bean.SubmitGrayLineIssueLocationReq
|
||||
@@ -73,4 +75,25 @@ interface TaxiRoutingServiceApi {
|
||||
@Header("ticket") ticket: String = SharedPrefsMgr.getInstance().token,
|
||||
@Body data: EndGrayContrailTaskReq
|
||||
): Observable<BaseData>
|
||||
|
||||
/**
|
||||
* 获取打点问题字典
|
||||
*/
|
||||
@Headers("Content-type:application/json;charset=UTF-8")
|
||||
@GET("/och-vehicle/api/dict/v1/dot/list")
|
||||
fun getDotErrorList(
|
||||
@Header("appId") appId: String = MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
@Header("ticket") ticket: String = SharedPrefsMgr.getInstance().token,
|
||||
): Observable<QueryPointErrorReasonsRsp>
|
||||
|
||||
/**
|
||||
* 结束一个路线的灰度任务
|
||||
*/
|
||||
@Headers("Content-type:application/json;charset=UTF-8")
|
||||
@POST("/och-taxi-cabin/api/business/v1/saveDotDetail")
|
||||
fun saveDotDetail(
|
||||
@Header("appId") appId: String = MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
@Header("ticket") ticket: String = SharedPrefsMgr.getInstance().token,
|
||||
@Body data: SaveGrayContrailErrorReasons
|
||||
): Observable<BaseData>
|
||||
}
|
||||
@@ -11,7 +11,9 @@ import com.mogo.och.common.module.network.interceptor.transformTry
|
||||
import com.mogo.och.taxi.bean.EndGrayContrailTaskReq
|
||||
import com.mogo.och.taxi.bean.GrayLineBean
|
||||
import com.mogo.och.taxi.bean.QueryGrayContrailListRsp
|
||||
import com.mogo.och.taxi.bean.QueryPointErrorReasonsRsp
|
||||
import com.mogo.och.taxi.bean.QueryRoutingContrailByIdRsp
|
||||
import com.mogo.och.taxi.bean.SaveGrayContrailErrorReasons
|
||||
import com.mogo.och.taxi.bean.StartGrayAndQueryContrailRsp
|
||||
import com.mogo.och.taxi.bean.StartGrayContrailTaskReq
|
||||
import com.mogo.och.taxi.bean.StartGrayContrailTaskRsp
|
||||
@@ -87,6 +89,22 @@ object TaxiRoutingServiceManager {
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "endGrayTask"))
|
||||
}
|
||||
|
||||
fun getErrorPointReasons(
|
||||
context: Context,
|
||||
callback: OchCommonServiceCallback<QueryPointErrorReasonsRsp>
|
||||
) {
|
||||
mRoutingServiceApi.getDotErrorList().transformTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "dot/list"))
|
||||
}
|
||||
fun saveDotDetail(
|
||||
context: Context,
|
||||
data: SaveGrayContrailErrorReasons,
|
||||
callback: OchCommonServiceCallback<BaseData>
|
||||
) {
|
||||
mRoutingServiceApi.saveDotDetail(data = data).transformTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "dot/list"))
|
||||
}
|
||||
|
||||
fun startGrayTaskAndQueryRoutingContrail(
|
||||
context: Context,
|
||||
sn: String,
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.mogo.och.taxi.ui.errorpoint
|
||||
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.CheckBox
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.och.taxi.R
|
||||
import com.mogo.och.taxi.bean.PointError
|
||||
|
||||
/**
|
||||
* Created by yangyakun on 06/06/17.
|
||||
*/
|
||||
class ErrorPointItemAdapter(
|
||||
private val context: Context,
|
||||
private val dataList: MutableList<PointError>
|
||||
) : RecyclerView.Adapter<ErrorPointItemAdapter.TextVH>() {
|
||||
|
||||
fun setDataList(dataList: List<PointError>) {
|
||||
this.dataList.clear()
|
||||
this.dataList.addAll(dataList)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun getCheckDataList():MutableList<PointError>{
|
||||
val mutableListOf = mutableListOf<PointError>()
|
||||
this.dataList.forEach {
|
||||
if(it.isCheck){
|
||||
mutableListOf.add(it)
|
||||
}
|
||||
}
|
||||
return mutableListOf
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TextVH {
|
||||
val view: View
|
||||
val inflater = LayoutInflater.from(context)
|
||||
view = inflater.inflate(R.layout.taxt_report_error_point_item, parent, false)
|
||||
return TextVH(view)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: TextVH, position: Int) {
|
||||
val errorInfo = dataList[holder.bindingAdapterPosition]
|
||||
holder.cbErrorInfo.text = errorInfo.name
|
||||
holder.cbErrorInfo.isChecked = errorInfo.isCheck
|
||||
holder.cbErrorInfo.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
if(buttonView==holder.cbErrorInfo){
|
||||
errorInfo.isCheck = isChecked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
return dataList.size
|
||||
}
|
||||
|
||||
inner class TextVH(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var cbErrorInfo: CheckBox
|
||||
init {
|
||||
cbErrorInfo = itemView.findViewById(R.id.cb_error_info)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.mogo.och.taxi.ui.errorpoint
|
||||
|
||||
import android.content.Context
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
import com.mogo.och.taxi.R
|
||||
import kotlinx.android.synthetic.main.dialog_taxt_report_error.repvErrorPointReason
|
||||
|
||||
class ReportErrorPointDialog(context: Context,grayId: Long?) : BaseFloatDialog(context), LifecycleObserver {
|
||||
|
||||
init {
|
||||
setContentView(R.layout.dialog_taxt_report_error)
|
||||
setCanceledOnTouchOutside(true)
|
||||
repvErrorPointReason.setGrayId(grayId)
|
||||
repvErrorPointReason.setDismiss(object :ReportErrorPointView.CloseCallback{
|
||||
override fun close() {
|
||||
dismiss()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun showDialog() {
|
||||
if (isShowing) {
|
||||
return
|
||||
}
|
||||
show()
|
||||
}
|
||||
|
||||
fun hideDialog() {
|
||||
if (isShowing) {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
package com.mogo.och.taxi.ui.errorpoint
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.google.android.flexbox.AlignItems
|
||||
import com.google.android.flexbox.FlexDirection
|
||||
import com.google.android.flexbox.FlexWrap
|
||||
import com.google.android.flexbox.FlexboxLayoutManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.common.module.wigets.WindowRelativeLayout
|
||||
import com.mogo.och.taxi.R
|
||||
import com.mogo.och.taxi.bean.PointError
|
||||
import com.mogo.och.taxi.ui.routing.TaxiRoutingLoadingDialog
|
||||
import kotlinx.android.synthetic.main.taxt_report_error_point_panel.view.rvErrorPointReason
|
||||
import kotlinx.android.synthetic.main.taxt_report_error_point_panel.view.tv_report_error_point_reason
|
||||
import kotlinx.android.synthetic.main.taxt_report_error_point_panel.view.tv_report_error_point_reason_cancel
|
||||
import kotlinx.android.synthetic.main.taxt_report_error_point_panel.view.tv_work_order_time
|
||||
|
||||
/**
|
||||
*
|
||||
* 评价View
|
||||
* Created on 2022/5/16
|
||||
*/
|
||||
class ReportErrorPointView : WindowRelativeLayout,
|
||||
ReportErrorPointViewModel.ReportErrorPointViewCallback {
|
||||
|
||||
constructor(context: Context) : super(context)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet) : super(context, attributeSet)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int) : super(
|
||||
context,
|
||||
attributeSet,
|
||||
defStyleAttr
|
||||
)
|
||||
|
||||
constructor(
|
||||
context: Context,
|
||||
attributeSet: AttributeSet,
|
||||
defStyleAttr: Int,
|
||||
defStyleRes: Int
|
||||
) : super(context, attributeSet, defStyleAttr, defStyleRes)
|
||||
|
||||
|
||||
private var viewModel: ReportErrorPointViewModel? = null
|
||||
|
||||
private lateinit var errorPointItemAdapter: ErrorPointItemAdapter
|
||||
|
||||
private var closeCallback: CloseCallback? = null
|
||||
|
||||
private var grayId: Long?=-1L
|
||||
|
||||
private var occurrenceTime:Long = System.currentTimeMillis()
|
||||
|
||||
private val mLoadingDialog: TaxiRoutingLoadingDialog by lazy {
|
||||
TaxiRoutingLoadingDialog(
|
||||
context
|
||||
)
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
d(SceneConstant.M_TAXI_P + TAG, "initView")
|
||||
LayoutInflater.from(context).inflate(R.layout.taxt_report_error_point_panel, this, true)
|
||||
|
||||
val flexboxLayoutManager = FlexboxLayoutManager(context)
|
||||
flexboxLayoutManager.flexDirection = FlexDirection.ROW;
|
||||
flexboxLayoutManager.alignItems = AlignItems.CENTER
|
||||
flexboxLayoutManager.flexWrap = FlexWrap.WRAP
|
||||
|
||||
rvErrorPointReason?.layoutManager = flexboxLayoutManager
|
||||
rvErrorPointReason?.setHasFixedSize(true)
|
||||
errorPointItemAdapter = ErrorPointItemAdapter(
|
||||
context, mutableListOf(
|
||||
|
||||
)
|
||||
)
|
||||
rvErrorPointReason?.adapter = errorPointItemAdapter
|
||||
|
||||
tv_report_error_point_reason_cancel.onClick {
|
||||
this.closeCallback?.close()
|
||||
}
|
||||
tv_report_error_point_reason.onClick {
|
||||
val checkDataList = errorPointItemAdapter.getCheckDataList()
|
||||
if(checkDataList.isEmpty()){
|
||||
ToastUtils.showShort("请选择问题类型")
|
||||
return@onClick
|
||||
}
|
||||
mLoadingDialog.showLoading()
|
||||
this.viewModel?.submitErrorPointReasons(checkDataList,occurrenceTime)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onVisibilityAggregated(isVisible: Boolean) {
|
||||
super.onVisibilityAggregated(isVisible)
|
||||
d(SceneConstant.M_TAXI_P + TAG, "展示---:${isVisible}")
|
||||
if (isVisible) {
|
||||
occurrenceTime = System.currentTimeMillis()
|
||||
tv_work_order_time.text = "时间:${TimeUtils.millis2String(occurrenceTime, TimeUtils.getHourMinSecondFormat())}"
|
||||
viewModel?.getPointErrorReasons()
|
||||
mLoadingDialog.showLoading()
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
viewModel = ViewModelProvider(this).get(ReportErrorPointViewModel::class.java)
|
||||
viewModel?.setViewCallback(this)
|
||||
viewModel?.setGrayId(grayId)
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "TaxiPassengerArrivedView"
|
||||
}
|
||||
|
||||
init {
|
||||
try {
|
||||
initView()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
override fun addViewData(it: MutableList<PointError>) {
|
||||
mLoadingDialog.hideLoading()
|
||||
errorPointItemAdapter.setDataList(it)
|
||||
}
|
||||
|
||||
override fun hideLoadingWithMessage(msg: String?) {
|
||||
msg?.let {
|
||||
ToastUtils.showLong(msg)
|
||||
}
|
||||
mLoadingDialog.hideLoading()
|
||||
}
|
||||
|
||||
override fun submitErrorReasons() {
|
||||
mLoadingDialog.hideLoading()
|
||||
this.closeCallback?.close()
|
||||
}
|
||||
|
||||
fun setDismiss(listener: CloseCallback) {
|
||||
this.closeCallback = listener
|
||||
}
|
||||
|
||||
fun setGrayId(grayId: Long?) {
|
||||
this.grayId = grayId
|
||||
}
|
||||
|
||||
interface CloseCallback {
|
||||
fun close()
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.mogo.och.taxi.ui.errorpoint
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.common.module.network.OchCommonServiceCallback
|
||||
import com.mogo.och.taxi.bean.PointError
|
||||
import com.mogo.och.taxi.bean.QueryPointErrorReasonsRsp
|
||||
import com.mogo.och.taxi.bean.SaveGrayContrailErrorReasons
|
||||
import com.mogo.och.taxi.network.TaxiRoutingServiceManager
|
||||
|
||||
class ReportErrorPointViewModel : ViewModel() {
|
||||
|
||||
private val TAG = ReportErrorPointViewModel::class.java.simpleName
|
||||
|
||||
private var viewCallback: ReportErrorPointViewCallback? = null
|
||||
|
||||
private var grayId: Long?=-1L
|
||||
|
||||
init {
|
||||
|
||||
}
|
||||
|
||||
fun setViewCallback(viewCallback: ReportErrorPointViewCallback) {
|
||||
this.viewCallback = viewCallback
|
||||
|
||||
}
|
||||
|
||||
fun getPointErrorReasons(){
|
||||
TaxiRoutingServiceManager.getErrorPointReasons(
|
||||
AbsMogoApplication.getApp(),
|
||||
object : OchCommonServiceCallback<QueryPointErrorReasonsRsp> {
|
||||
override fun onSuccess(data: QueryPointErrorReasonsRsp?) {
|
||||
data?.data?.let {
|
||||
viewCallback?.addViewData(it)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFail(code: Int, msg: String?) {
|
||||
viewCallback?.hideLoadingWithMessage(msg)
|
||||
}
|
||||
|
||||
override fun onError() {
|
||||
super.onError()
|
||||
viewCallback?.hideLoadingWithMessage("网络错误、请稍后再试")
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
override fun onCleared() {
|
||||
super.onCleared()
|
||||
this.viewCallback = null
|
||||
}
|
||||
|
||||
fun submitErrorPointReasons(checkDataList: MutableList<PointError>, occurrenceTime: Long) {
|
||||
CallerLogger.d(TAG,checkDataList,grayId)
|
||||
if (grayId == null || grayId!! < 0L) {
|
||||
viewCallback?.hideLoadingWithMessage("未找到规划Id")
|
||||
return
|
||||
}
|
||||
grayId?.let {
|
||||
val gcj02 = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
val wgs84 = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
val errorReasonCodes = mutableListOf<String>()
|
||||
checkDataList.forEach {pointError->
|
||||
errorReasonCodes.add(pointError.code)
|
||||
}
|
||||
val saveGrayContrailErrorReasons = SaveGrayContrailErrorReasons(
|
||||
it,
|
||||
gcj02.longitude,
|
||||
gcj02.latitude,
|
||||
wgs84.longitude,
|
||||
wgs84.latitude,
|
||||
occurrenceTime,
|
||||
errorReasonCodes
|
||||
)
|
||||
TaxiRoutingServiceManager.saveDotDetail(
|
||||
AbsMogoApplication.getApp(),
|
||||
saveGrayContrailErrorReasons,
|
||||
object : OchCommonServiceCallback<BaseData> {
|
||||
override fun onSuccess(data: BaseData?) {
|
||||
if (data != null && data.code == 0){
|
||||
ToastUtils.showShort("提交成功")
|
||||
viewCallback?.submitErrorReasons()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFail(code: Int, msg: String?) {
|
||||
viewCallback?.hideLoadingWithMessage(msg)
|
||||
}
|
||||
|
||||
override fun onError() {
|
||||
super.onError()
|
||||
viewCallback?.hideLoadingWithMessage("网络错误、请稍后再试")
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun setGrayId(grayId: Long?) {
|
||||
this.grayId = grayId
|
||||
}
|
||||
|
||||
|
||||
interface ReportErrorPointViewCallback {
|
||||
fun addViewData(it: MutableList<PointError>)
|
||||
fun hideLoadingWithMessage(msg: String?)
|
||||
|
||||
fun submitErrorReasons()
|
||||
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02Lis
|
||||
import com.mogo.eagle.core.function.main.MainMoGoApplication
|
||||
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.ActivityUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.common.module.map.AmapNaviToDestinationModel
|
||||
@@ -19,6 +20,7 @@ import com.mogo.och.taxi.R
|
||||
import com.mogo.och.taxi.bean.EndGrayTaskFeedbackType
|
||||
import com.mogo.och.taxi.constant.TaxiDriverEventConst
|
||||
import com.mogo.och.taxi.constant.TaxiUnmannedConst
|
||||
import com.mogo.och.taxi.ui.errorpoint.ReportErrorPointDialog
|
||||
import com.mogo.och.taxi.utils.MapMakerManager
|
||||
import com.mogo.och.taxi.utils.TaskUtils
|
||||
import kotlinx.android.synthetic.main.routing_fragment.btnChooseTask
|
||||
@@ -195,11 +197,16 @@ class TaxiRoutingFragment : BaseFragment(), ICommonNaviChangedCallback {
|
||||
)
|
||||
}
|
||||
btnSummitIssue.setOnClickListener {
|
||||
mViewModel.sendUiIntent(
|
||||
TaxiRoutingUiIntent.SubmitGrayLineIssueLocation(
|
||||
routingTask.grayId ?: -1L
|
||||
)
|
||||
)
|
||||
// mViewModel.sendUiIntent(
|
||||
// TaxiRoutingUiIntent.SubmitGrayLineIssueLocation(
|
||||
// routingTask.grayId ?: -1L
|
||||
// )
|
||||
// )
|
||||
//ErrorPointFloatWindow(ActivityUtils.getTopActivity()).showFloatWindow()
|
||||
context?.let {
|
||||
ReportErrorPointDialog(it,routingTask.grayId ?: -1L).showDialog()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
naviToStart.visibility = View.INVISIBLE
|
||||
@@ -247,6 +254,7 @@ class TaxiRoutingFragment : BaseFragment(), ICommonNaviChangedCallback {
|
||||
}
|
||||
|
||||
private fun showFeedbackDialog(grayId: Long) {
|
||||
val occurrenceTime = System.currentTimeMillis()
|
||||
val builder: TaxiRoutingFeedbackDialog.Builder = TaxiRoutingFeedbackDialog.Builder()
|
||||
builder.cancelStr(
|
||||
MainMoGoApplication.getApp()
|
||||
@@ -261,7 +269,8 @@ class TaxiRoutingFragment : BaseFragment(), ICommonNaviChangedCallback {
|
||||
mViewModel.sendUiIntent(
|
||||
TaxiRoutingUiIntent.SubmitEndTask(
|
||||
grayId,
|
||||
EndGrayTaskFeedbackType.USABLE_YES
|
||||
EndGrayTaskFeedbackType.USABLE_YES,
|
||||
occurrenceTime
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -270,7 +279,8 @@ class TaxiRoutingFragment : BaseFragment(), ICommonNaviChangedCallback {
|
||||
mViewModel.sendUiIntent(
|
||||
TaxiRoutingUiIntent.SubmitEndTask(
|
||||
grayId,
|
||||
EndGrayTaskFeedbackType.USABLE_NO
|
||||
EndGrayTaskFeedbackType.USABLE_NO,
|
||||
occurrenceTime
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ class TaxiRoutingFragmentViewModel : BaseViewModel<TaxiRoutingUiState, TaxiRouti
|
||||
|
||||
is TaxiRoutingUiIntent.SubmitEndTask -> {
|
||||
DebugView.printInfoMsg("[结束任务] 准备结束任务,grayId=${intent.grayId}, type=${intent.type.name}")
|
||||
TaxiRoutingModel.endGrayTask(intent.grayId, intent.type)
|
||||
TaxiRoutingModel.endGrayTask(intent.grayId, intent.type,intent.occurrenceTime)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -374,9 +374,9 @@ object TaxiRoutingModel {
|
||||
)
|
||||
}
|
||||
|
||||
fun endGrayTask(grayId: Long, type: EndGrayTaskFeedbackType) {
|
||||
fun endGrayTask(grayId: Long, type: EndGrayTaskFeedbackType, occurrenceTime:Long,) {
|
||||
DebugView.printInfoMsg("[结束灰度任务] 准备发送请求,grayId=$grayId, type=${type.type}, typeName=${type.name}")
|
||||
val submit = EndGrayContrailTaskReq(grayId, type.type)
|
||||
val submit = EndGrayContrailTaskReq(grayId, type.type,occurrenceTime)
|
||||
TaxiRoutingServiceManager.endGrayTask(
|
||||
mContext,
|
||||
submit,
|
||||
|
||||
@@ -29,6 +29,6 @@ sealed class TaxiRoutingUiIntent : IUiIntent {
|
||||
data class ShowFeedbackDialog(val grayId: Long) : TaxiRoutingUiIntent()
|
||||
|
||||
//结束任务
|
||||
data class SubmitEndTask(val grayId: Long, val type: EndGrayTaskFeedbackType) :
|
||||
data class SubmitEndTask(val grayId: Long, val type: EndGrayTaskFeedbackType,val occurrenceTime:Long) :
|
||||
TaxiRoutingUiIntent()
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 110 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 94 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:drawable="@drawable/taxi_error_point_reason_unselect"
|
||||
android:state_checked="false"/>
|
||||
|
||||
<item
|
||||
android:drawable="@drawable/taxi_error_point_reason_select"
|
||||
android:state_checked="true"/>
|
||||
|
||||
</selector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#0056FF"/>
|
||||
<corners android:radius="@dimen/dp_8"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle"
|
||||
android:useLevel="false"
|
||||
>
|
||||
|
||||
<!--内部填充-->
|
||||
<solid android:color="#1AA7B6F0" />
|
||||
|
||||
<stroke
|
||||
android:width="@dimen/dp_1"
|
||||
android:color="#A7B6F0"
|
||||
/>
|
||||
|
||||
<corners android:radius="@dimen/dp_8"/>
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#029DFF"
|
||||
android:endColor="#0056FF"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.och.taxi.ui.errorpoint.ReportErrorPointView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/repvErrorPointReason"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</com.mogo.och.taxi.ui.errorpoint.ReportErrorPointView>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<CheckBox
|
||||
android:id="@+id/cb_error_info"
|
||||
android:button="@null"
|
||||
android:text="原因"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:paddingStart="@dimen/dp_40"
|
||||
android:paddingEnd="@dimen/dp_40"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:paddingBottom="@dimen/dp_14"
|
||||
android:textColor="@color/white"
|
||||
android:background="@drawable/taxi_error_point_reason_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</FrameLayout>
|
||||
@@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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_844"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/taxi_error_point_report_bg">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_title_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_102"
|
||||
android:background="@drawable/taxi_error_point_head_bg"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_report_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_33"
|
||||
android:text="问题上报"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_34"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_title_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_title_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_title_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_work_order_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_31"
|
||||
android:text="时间"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_30"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_title_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_title_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_title_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_type_label"
|
||||
android:layout_width="@dimen/dp_6"
|
||||
android:layout_height="@dimen/dp_29"
|
||||
android:layout_marginStart="@dimen/dp_33"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:background="#FF0176FF"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_title_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_type_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_13"
|
||||
android:text="问题类型"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_type_label"
|
||||
app:layout_constraintLeft_toRightOf="@id/view_type_label"
|
||||
app:layout_constraintTop_toTopOf="@id/view_type_label" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvErrorPointReason"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_23"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_23"
|
||||
app:layout_constraintHeight_min="@dimen/dp_140"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_type_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_report_error_point_reason"
|
||||
android:layout_width="@dimen/dp_370"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
android:background="@drawable/taxi_error_point_report_submit_bg"
|
||||
android:gravity="center"
|
||||
android:text="上报"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/sp_27"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tv_report_error_point_reason_cancel"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rvErrorPointReason" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_report_error_point_reason_cancel"
|
||||
android:layout_width="@dimen/dp_370"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
android:background="@drawable/taxi_error_point_report_cancle_bg"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/sp_27"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tv_report_error_point_reason"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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_844"
|
||||
android:layout_height="@dimen/dp_808">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_102"
|
||||
android:background="@drawable/icon_work_order_title"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -18,7 +18,7 @@ import com.mogo.och.common.module.utils.BigFrameAnimatorContainer
|
||||
import com.mogo.och.common.module.utils.RxUtils
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
import com.mogo.och.taxi.passenger.ui.TaxiPassengerBaseFragment
|
||||
import com.mogo.och.taxi.passenger.widget.WindowRelativeLayout
|
||||
import com.mogo.och.common.module.wigets.WindowRelativeLayout
|
||||
import io.reactivex.disposables.Disposable
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_arrived_end_panel.view.aciv_bg
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_arrived_end_panel.view.aciv_close
|
||||
|
||||
@@ -21,7 +21,7 @@ import com.mogo.och.common.module.manager.xiaozhi.ZhiViewmanager
|
||||
import com.mogo.och.common.module.utils.BigFrameAnimatorContainer
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
import com.mogo.och.taxi.passenger.model.TaxiPassengerModel
|
||||
import com.mogo.och.taxi.passenger.widget.WindowRelativeLayout
|
||||
import com.mogo.och.common.module.wigets.WindowRelativeLayout
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_check_startautopilot.view.aciv_check_autopilot
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_check_startautopilot.view.aciv_start_autopilt_success_ani
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_check_startautopilot.view.aciv_start_autopilt_success_bg
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.mogo.och.common.module.manager.device.data.DoorPosition
|
||||
import com.mogo.och.common.module.manager.device.data.DoorState
|
||||
import com.mogo.och.common.module.utils.FrameAnimatorContainer
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
import com.mogo.och.taxi.passenger.widget.WindowRelativeLayout
|
||||
import com.mogo.och.common.module.wigets.WindowRelativeLayout
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_start_autopilot_view.view.aciv_middle_car
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_start_autopilot_view.view.actv_front_left_door
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_start_autopilot_view.view.actv_front_right_door
|
||||
|
||||
@@ -289,6 +289,7 @@ static def getBuildTime() {
|
||||
|
||||
Object readFileToJson(env) {
|
||||
try {
|
||||
println "对比结果${env}----------"
|
||||
// 加载config.json 文件
|
||||
File file = new File("${rootDir}/app/config/urlConfig.json")
|
||||
def jsonSlurper = new JsonSlurper()
|
||||
@@ -314,11 +315,12 @@ Object readFileToJson(env) {
|
||||
def variantName() {
|
||||
if(gradle.startParameter.taskNames.size()>0) {
|
||||
for (String taskName : gradle.startParameter.taskNames) {
|
||||
|
||||
println "对比结果----------${taskName}"
|
||||
if (taskName.contains("Yantai")) {
|
||||
project.dependencies.add('implementation', project.project(':tts:tts-iflytek'))
|
||||
}else if (taskName.contains("Mogo")) {
|
||||
if(taskName.contains("TaxiPassenger")) {
|
||||
if(taskName.contains("Passenger")&&taskName.contains("T1T2")) {
|
||||
println "Mogo环境T1T2车 引入小智----------${taskName}"
|
||||
project.dependencies.add('implementation', project.project(':tts:tts-zhi'))
|
||||
}else {
|
||||
project.dependencies.add('implementation', project.project(':tts:tts-pad'))
|
||||
@@ -326,7 +328,8 @@ def variantName() {
|
||||
}else if (taskName.contains("Dali")) {
|
||||
project.dependencies.add('implementation', project.project(':tts:tts-pad'))
|
||||
}else if (taskName.contains("Saas")) {
|
||||
if(taskName.contains("TaxiunmannedPassenger")) {
|
||||
if(taskName.contains("Passenger")&&taskName.contains("T1T2")) {
|
||||
println "Saas环境T1T2车 引入小智----------${taskName}"
|
||||
project.dependencies.add('implementation', project.project(':tts:tts-zhi'))
|
||||
}else {
|
||||
project.dependencies.add('implementation', project.project(':tts:tts-pad'))
|
||||
|
||||
@@ -114,6 +114,17 @@ object VoiceControlFacade: IMoGoVoiceControlFacade, IMogoVoiceCmdCallBack, IMogo
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStopTts(speakText: String?) {
|
||||
super.onStopTts(speakText)
|
||||
listeners
|
||||
.filter {
|
||||
it.get() != null
|
||||
}
|
||||
.forEach {
|
||||
it.get()?.onSpeakEnd()
|
||||
}
|
||||
}
|
||||
|
||||
override fun register() {
|
||||
if (hasRegister.get()) {
|
||||
return
|
||||
|
||||
@@ -167,6 +167,11 @@ class MoGoHmiProvider : IMoGoHmiProvider {
|
||||
super.onSpeakError(speakText, errorMsg)
|
||||
isPlayingTts.set(false)
|
||||
}
|
||||
|
||||
override fun onStopTts(speakText: String?) {
|
||||
super.onStopTts(speakText)
|
||||
isPlayingTts.set(false)
|
||||
}
|
||||
})
|
||||
isPlayingTts.set(true)
|
||||
}
|
||||
|
||||
@@ -179,8 +179,8 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
holder.tvFmActionOpen.text = "建议操作:暂无"
|
||||
holder.tvFmActionNormal.text = "建议操作:暂无"
|
||||
//Title
|
||||
holder.tvFmTitleNormal.text = MsgFmData.getFmPolicyName(fmInfoMsg.policyCode)
|
||||
holder.tvFmTitleOpen.text = MsgFmData.getFmPolicyName(fmInfoMsg.policyCode)
|
||||
holder.tvFmTitleNormal.text = "暂无建议操作"
|
||||
holder.tvFmTitleOpen.text = "暂无建议操作"
|
||||
}else{
|
||||
val receiveFaultLevel = ArrayList<Int>()
|
||||
fmInfoMsg.fmInfoList!!.forEach { info ->
|
||||
@@ -200,8 +200,8 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
receiveFaultLevel.sort()
|
||||
// receiveFaultLevel.reverse()
|
||||
//Title
|
||||
holder.tvFmTitleNormal.text = MsgFmData.FaultAction.getFaultAction(receiveFaultLevel[0])
|
||||
holder.tvFmTitleOpen.text = MsgFmData.FaultAction.getFaultAction(receiveFaultLevel[0])
|
||||
holder.tvFmTitleNormal.text = MsgFmData.FaultAction.getFaultTitle(receiveFaultLevel[0])
|
||||
holder.tvFmTitleOpen.text = MsgFmData.FaultAction.getFaultTitle(receiveFaultLevel[0])
|
||||
//不同级别的Icon显示
|
||||
when(receiveFaultLevel[0]){
|
||||
0->{
|
||||
|
||||
@@ -21,7 +21,9 @@ import com.mogo.eagle.core.utilcode.kotlin.scope
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.*
|
||||
import kotlinx.coroutines.Runnable
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import java.util.concurrent.CopyOnWriteArrayList
|
||||
@@ -62,6 +64,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
updateStatusBarLeftView(true, FUNC_MODE_DEMO, DemoModeView(this.context))
|
||||
updateStatusBarLeftView(true, FUNC_MODE_RAIN, RainModeView(this.context))
|
||||
routeDownloadStatusRoot?.visibility = View.GONE
|
||||
CallerDevaToolsManager.registerRouteDownloadListener(TAG) { state ->
|
||||
when(state) {
|
||||
0 -> {
|
||||
@@ -76,10 +79,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
routeDownloadStatusRoot?.visibility = View.VISIBLE
|
||||
routeDownloadStatus?.background = ContextCompat.getDrawable(context, R.drawable.bg_autopilot_route_download_success)
|
||||
routeDownloadFailMark?.visibility = View.GONE
|
||||
scope.launch {
|
||||
delay(3000)
|
||||
routeDownloadStatusRoot?.visibility = View.GONE
|
||||
}
|
||||
UiThreadHandler.postDelayed(Runnable { routeDownloadStatusRoot?.visibility = View.GONE }, 3000)
|
||||
}
|
||||
3 -> {
|
||||
routeDownloadStatusRoot?.visibility = View.VISIBLE
|
||||
|
||||
@@ -13,18 +13,21 @@ object HmiBuildConfig {
|
||||
* 是否显示 限速UI
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var isShowLimitingVelocityView = false
|
||||
|
||||
/**
|
||||
* 是否显示 红绿等
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var isShowTrafficLightView = false
|
||||
|
||||
/**
|
||||
* 是否显示 车端融合红绿等
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var isShowCarSourceTrafficLightView = false
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,13 +15,13 @@ class MsgFmData{
|
||||
val faultLevel: Int//故障处理级别
|
||||
){
|
||||
//请求平行驾驶接管
|
||||
FM_ACT_NEED_PARALLEL_DERVING_TAKEOVER("恢复策略","请求平行驾驶接管","FM_ACT_NEED_PARALLEL_DERVING_TAKEOVER","如planing出站时,规划失败",3),
|
||||
FM_ACT_NEED_PARALLEL_DERVING_TAKEOVER("恢复策略","请求平行驾驶,请注意随时接管","FM_ACT_NEED_PARALLEL_DERVING_TAKEOVER","如planing出站时,规划失败",3),
|
||||
//请求人工驾驶接管
|
||||
FM_ACT_NEED_MANNUAL_DERVING("恢复策略","请求人工驾驶接管","FM_ACT_NEED_MANNUAL_DERVING","如planing规划失败,且存在弱网判断",0),
|
||||
//系统重启
|
||||
FM_ACT_NEED_RESTART_SYSTEM("恢复策略","系统重启","FM_ACT_NEED_RESTART_SYSTEM","如检测到出现多个节点奔溃",2),
|
||||
FM_ACT_NEED_RESTART_SYSTEM("恢复策略","请进行系统软重启","FM_ACT_NEED_RESTART_SYSTEM","如检测到出现多个节点奔溃",2),
|
||||
//整车下电重启
|
||||
FM_ACT_MUST_VEHICLE_POWER_RESET("恢复策略","整车下电重启","FM_ACT_MUST_VEHICLE_POWER_RESET","如底盘无数据,需要下电重启",1),
|
||||
FM_ACT_MUST_VEHICLE_POWER_RESET("恢复策略","请进行整车下电重启","FM_ACT_MUST_VEHICLE_POWER_RESET","如底盘无数据,需要下电重启",1),
|
||||
//请联系硬件工程师
|
||||
FM_ACT_CONTACT_HARDWARE_ENGINEER("人工处理","请联系硬件工程师","FM_ACT_CONTACT_HARDWARE_ENGINEER","硬件接线,域控启动等故障",4),
|
||||
//请联系运维工程师
|
||||
@@ -48,7 +48,7 @@ class MsgFmData{
|
||||
FM_ACT_CONTACT_OPERATIONS_ENGINEER.faultActionCode ->FM_ACT_CONTACT_OPERATIONS_ENGINEER.faultLevel
|
||||
//请联系软件工程师
|
||||
FM_ACT_CONTACT_SOFTWARE_ENGINEER.faultActionCode -> FM_ACT_CONTACT_SOFTWARE_ENGINEER.faultLevel
|
||||
else -> 0
|
||||
else -> 5
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,27 @@ class MsgFmData{
|
||||
FM_ACT_CONTACT_OPERATIONS_ENGINEER.faultLevel ->FM_ACT_CONTACT_OPERATIONS_ENGINEER.faultAction
|
||||
//请联系软件工程师
|
||||
FM_ACT_CONTACT_SOFTWARE_ENGINEER.faultLevel -> FM_ACT_CONTACT_SOFTWARE_ENGINEER.faultAction
|
||||
else -> ""
|
||||
else -> "暂无建议操作,请视实际情况注意接管"
|
||||
}
|
||||
}
|
||||
|
||||
fun getFaultTitle(faultActionLevel: Int): String{
|
||||
return when(faultActionLevel){
|
||||
//请求平行驾驶接管
|
||||
FM_ACT_NEED_PARALLEL_DERVING_TAKEOVER.faultLevel -> FM_ACT_NEED_PARALLEL_DERVING_TAKEOVER.faultAction
|
||||
//请求人工驾驶接管
|
||||
FM_ACT_NEED_MANNUAL_DERVING.faultLevel -> FM_ACT_NEED_MANNUAL_DERVING.faultAction
|
||||
//系统重启
|
||||
FM_ACT_NEED_RESTART_SYSTEM.faultLevel -> FM_ACT_NEED_RESTART_SYSTEM.faultAction
|
||||
//整车下电重启
|
||||
FM_ACT_MUST_VEHICLE_POWER_RESET.faultLevel -> FM_ACT_MUST_VEHICLE_POWER_RESET.faultAction
|
||||
//请联系硬件工程师
|
||||
FM_ACT_CONTACT_HARDWARE_ENGINEER.faultLevel -> FM_ACT_CONTACT_HARDWARE_ENGINEER.faultAction
|
||||
//请联系运维工程师
|
||||
FM_ACT_CONTACT_OPERATIONS_ENGINEER.faultLevel ->FM_ACT_CONTACT_OPERATIONS_ENGINEER.faultAction
|
||||
//请联系软件工程师
|
||||
FM_ACT_CONTACT_SOFTWARE_ENGINEER.faultLevel -> FM_ACT_CONTACT_SOFTWARE_ENGINEER.faultAction
|
||||
else -> "暂无建议操作"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,8 +90,8 @@ WEBSOCKET_VERSION=1.1.7
|
||||
applicationId=com.mogo.launcer
|
||||
applicationName=IntelligentPilot
|
||||
# RoboBus司机端:2.5.1;RoboTaxi司机端:2.5.1;RoboTaxi乘客端:1.0.0
|
||||
versionCode=6002004
|
||||
versionName=6.2.4
|
||||
versionCode=6004002
|
||||
versionName=6.4.2
|
||||
|
||||
################# 新架构模块Maven版本管理 #################
|
||||
MOGO_CORE_FUNCTION_HMI_VERSION=0.0.58.10
|
||||
@@ -149,7 +149,7 @@ MATRIX_VERSION=2.0.8
|
||||
|
||||
|
||||
# 公交模式司机端版本号
|
||||
DRIVER_VERSION=6.4.0
|
||||
DRIVER_VERSION=6.4.2
|
||||
# 公交模式乘客端端版本号
|
||||
PASSENGER_VERSION=5.4.0
|
||||
PASSENGER_VERSION=5.4.2
|
||||
|
||||
|
||||
@@ -121,10 +121,11 @@ public class ObjectUtils {
|
||||
if(trafficData.getColor().contains("-drawColor")){
|
||||
// markerOptions.setColorType(3);
|
||||
markerOptions.setColor(trafficData.getColor().split("-")[0]);
|
||||
}
|
||||
if(trafficData.getColor().contains("-resetColor")){
|
||||
} else if(trafficData.getColor().contains("-resetColor")){
|
||||
// markerOptions.setColorType(4);
|
||||
markerOptions.setColor(trafficData.getColor().split("-")[0]);
|
||||
} else{
|
||||
markerOptions.setColor(trafficData.getColor());
|
||||
}
|
||||
}else{
|
||||
// markerOptions.setColorType(0);
|
||||
|
||||
@@ -74,6 +74,9 @@ interface IMogoTTSCallback {
|
||||
default void onSpeakEnd( String speakText ) {
|
||||
}
|
||||
|
||||
default void onStopTts( String speakText ) {
|
||||
}
|
||||
|
||||
default void onSpeakError( String speakText, String errorMsg) {
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ class IFlyTekTts : IMogoTTS, InitListener {
|
||||
curTtsEntity?.let {
|
||||
val string = it.toString()
|
||||
if (speakVoiceMap.containsKey(string)) {
|
||||
speakVoiceMap.remove(string)
|
||||
speakVoiceMap.remove(string)?.onStopTts(string)
|
||||
}
|
||||
curTtsEntity = null
|
||||
}
|
||||
|
||||
@@ -357,7 +357,10 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack {
|
||||
|
||||
public void stopSpeakTts(String text) {
|
||||
if (mEngine != null && mHasAuth) {
|
||||
mSpeakVoiceMap.remove(text);
|
||||
IMogoTTSCallback callBack = mSpeakVoiceMap.remove(text);
|
||||
if (callBack != null) {
|
||||
callBack.onStopTts(curTtsContent);
|
||||
}
|
||||
curTtsContent = "";
|
||||
curTtsLevel = -1;
|
||||
mEngine.stop();
|
||||
@@ -366,7 +369,10 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack {
|
||||
|
||||
public void stopTts() {
|
||||
if (mEngine != null && mHasAuth) {
|
||||
mSpeakVoiceMap.remove(curTtsContent);
|
||||
IMogoTTSCallback callBack = mSpeakVoiceMap.remove(curTtsContent);
|
||||
if (callBack != null) {
|
||||
callBack.onStopTts(curTtsContent);
|
||||
}
|
||||
// tts过程中调用stop不会有回调事件
|
||||
curTtsContent = "";
|
||||
curTtsLevel = -1;
|
||||
|
||||
Reference in New Issue
Block a user