Merge branch 'refs/heads/dev_robobus-d_241226_6.8.6' into dev_robotaxi-d_241210_6.9.0

# Conflicts:
#	OCH/common/common/src/debug/java/com/mogo/och/common/module/debug/DebugDataDispatch.kt
#	gradle.properties
This commit is contained in:
xinfengkun
2025-01-03 18:19:58 +08:00
22 changed files with 1388 additions and 52 deletions

View File

@@ -5,7 +5,6 @@ import android.os.Bundle
import android.os.SystemClock
import android.util.AttributeSet
import android.util.Log
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@@ -57,7 +56,6 @@ import com.mogo.eagle.core.function.hmi.ui.operate.preferences.PreferenceWithWel
import com.mogo.eagle.core.function.hmi.ui.tools.SweeperModeChangedConfirmDialog
import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog.Companion.hmiAction
import com.mogo.eagle.core.function.hmi.ui.utils.SOPAnalyticsManager.clickEventAnalytics
import com.mogo.eagle.core.utilcode.floating.MoGoPopWindow
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
@@ -66,7 +64,10 @@ import com.mogo.eagle.core.utilcode.mogo.vehicle.SweeperVehicleConfigUtils
import com.mogo.eagle.core.utilcode.rv.divider.CommonDividerItemDecoration
import com.mogo.eagle.core.utilcode.util.AppStateManager
import com.mogo.eagle.core.utilcode.util.GsonUtils.*
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.support.device.led.ILedForeverChangeWelcomeContentListener
import com.mogo.support.device.led.LedSourceManager
import com.zhjt.mogo.adas.data.AdasConstants
import com.zhjt.mogo.adas.data.bean.AdasParam
import kotlinx.android.synthetic.main.layout_operate_panel.view.iv_operate_panel_close
@@ -1521,6 +1522,22 @@ class OperatePanelLayout : LinearLayout {
FunctionBuildConfig.welcomeWords = preference.extras.getString(PreferenceWithWelcomeWords.KEY_BUNDLE_CURRENT_EDIT_TEXT_VALUE)
hmiAction("外屏欢迎语", FunctionBuildConfig.welcomeWords ?: "")
clickEventAnalytics("外屏欢迎语", true)
LedSourceManager.foreverChangeWelcomeHint(
context?.applicationContext,
FunctionBuildConfig.welcomeWords,
object : ILedForeverChangeWelcomeContentListener {
override fun onChangeState(isSucceed: Boolean, errMsg: String) {
val customPreference: PreferenceWithWelcomeWords? =
findPreference(KEY_WELCOME_WORDS)
customPreference?.let {
ThreadUtils.runOnUiThread {
it.setOkBtnEnable()
}
}
ToastUtils.showLong(errMsg)
}
}
)
}
return super.onPreferenceClick(preference)
}

View File

@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.hmi.ui.operate.preferences
import android.content.Context
import android.text.TextUtils
import android.util.AttributeSet
import android.view.View
import android.widget.EditText
import androidx.core.widget.doOnTextChanged
import androidx.preference.Preference
@@ -23,6 +24,7 @@ class PreferenceWithWelcomeWords: Preference {
private var mCurrentWelcomeWords: String? = null
private var btnOk: View? = null
override fun setDefaultValue(defaultValue: Any?) {
super.setDefaultValue(defaultValue)
@@ -36,21 +38,25 @@ class PreferenceWithWelcomeWords: Preference {
super.onBindViewHolder(holder)
val currentWelcomeWords = mCurrentWelcomeWords
val et = holder.findViewById(R.id.et_welcome_words) as? EditText
val btn_ok = holder.findViewById(R.id.bt_ok)
btn_ok.isEnabled = false
btnOk = holder.findViewById(R.id.bt_ok)
btnOk?.isEnabled = false
et?.doOnTextChanged { text, _, _, _ ->
if (!TextUtils.isEmpty(text)) {
btn_ok?.isEnabled = true
btnOk?.isEnabled = true
} else {
btn_ok?.isEnabled = false
btnOk?.isEnabled = false
}
}
if (!TextUtils.isEmpty(currentWelcomeWords)) {
et?.setText(currentWelcomeWords)
}
btn_ok.onClick {
btnOk?.onClick {
btnOk?.isEnabled = false
extras.putString(KEY_BUNDLE_CURRENT_EDIT_TEXT_VALUE, et?.text.toString())
onPreferenceClickListener?.onPreferenceClick(this)
}
}
fun setOkBtnEnable(){
btnOk?.isEnabled = true
}
}

View File

@@ -484,7 +484,7 @@ class RoadV2NEventWindowView @JvmOverloads constructor(
"更新时间:${DateTimeUtils.getTimeText(dataBean.timestamp, DateTimeUtils.HH_mm_ss)}"
if (dataBean.isNeedTTS && !TextUtils.isEmpty(dataBean.ttsStr)) {
AIAssist.getInstance(context)
.speakTTSVoiceWithLevel(dataBean.ttsStr, AIAssist.LEVEL0)
.speakTTSVoiceWithLevel(dataBean.ttsStr, AIAssist.NEW_LEVEL_2)
}
when (dataBean.eventType) {
RoadV2NEventType.TEXT -> {

View File

@@ -31,10 +31,10 @@
android:key="mofang"
android:layout="@layout/layout_operate_panel_preference_header"
android:title="蘑方" />
<!-- <Preference-->
<!-- android:fragment="com.mogo.eagle.core.function.hmi.ui.operate.OperatePanelLayout$WelcomeWordsPreferenceCompat"-->
<!-- android:key="welcome_words"-->
<!-- android:layout="@layout/layout_operate_panel_preference_header"-->
<!-- android:title="欢迎语"/>-->
<Preference
android:fragment="com.mogo.eagle.core.function.hmi.ui.operate.OperatePanelLayout$WelcomeWordsPreferenceCompat"
android:key="welcome_words"
android:layout="@layout/layout_operate_panel_preference_header"
android:title="欢迎语"/>
</androidx.preference.PreferenceScreen>