Merge branch 'dev_robotaxi-d_231031_6.2.0' into dev_robotaxi-d_231129_6.2.2_routing_verify

This commit is contained in:
aibingbing
2023-12-01 13:31:43 +08:00
26 changed files with 216 additions and 251 deletions

View File

@@ -3,12 +3,9 @@ package com.mogo.eagle.core.function.hmi.receiver
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.biz.notice.NoticeNormalData
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.utilcode.util.SharedPrefs
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
/**
* 用于普通云公告的测试
@@ -24,23 +21,25 @@ class NoticeNormalBroadcastReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
try {
// 分发场景
dispatchShowWaring("11", "官方公告", "测试普通云公告普通云公告普通云公告普通云公告普通云公告普通云公告普通云公告哈哈哈哈哈哈好好",
"https://dataservice-1255510688.cos.ap-beijing.myqcloud.com/carImg/yycp_NoticeDETAIL_location.png",
"https://vd2.bdstatic.com/mda-mk1347dzxdmcre0y/sc/cae_h264/1635819498112313003/mda-mk1347dzxdmcre0y.mp4?v_from_s=hkapp-haokan-tucheng&auth_key=1635837585-0-0-5295f6658c7711ba7b4d3ef478a7fbaa&bcevod_channel=searchbox_feed&pd=1&pt=3&abtest=",
2)
SharedPrefs.getInstance(context).putInt("videoType", 1)
dispatchShowWaring(
"11", "官方公告", "测试普通云公告普通云公告普通云公告普通云公告普通云公告普通云公告普通云公告哈哈哈哈哈哈好好",
"https://dataservice-1255510688.cos.ap-beijing.myqcloud.com/carImg/yycp_NoticeDETAIL_location.png",
"https://vd2.bdstatic.com/mda-mk1347dzxdmcre0y/sc/cae_h264/1635819498112313003/mda-mk1347dzxdmcre0y.mp4?v_from_s=hkapp-haokan-tucheng&auth_key=1635837585-0-0-5295f6658c7711ba7b4d3ef478a7fbaa&bcevod_channel=searchbox_feed&pd=1&pt=3&abtest=",
2
)
SharedPrefsMgr.getInstance(context).putInt("videoType", 1)
} catch (e: Exception) {
e.printStackTrace()
}
}
private fun dispatchShowWaring(
id: String,
titleTv: String,
contentTv: String,
imageUrl: String,
videoUrl: String,
fileType: Int
id: String,
titleTv: String,
contentTv: String,
imageUrl: String,
videoUrl: String,
fileType: Int
) {
val data = NoticeNormalData()

View File

@@ -1,8 +1,6 @@
package com.mogo.eagle.core.function.hmi.ui.msgbox.adapter
import android.app.Activity
import android.graphics.LinearGradient
import android.graphics.Shader
import android.os.CountDownTimer
import android.view.LayoutInflater
import android.view.View
@@ -21,6 +19,7 @@ import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
import com.mogo.eagle.core.widget.AlignTextView
import com.mogo.eagle.core.widget.AlignTwoTextView
import com.mogo.eagle.core.widget.RoundCanClickConstraintLayout
/**
@@ -130,23 +129,16 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
is BubbleVoiceHolder -> {
data?.let {
val voiceMsg = it[position].msgBoxBean.bean as VoiceMsg
holder.tvPassengerVoiceContent.text = voiceMsg.msg
if(voiceMsg.isResp){
//小智说的
holder.tvPassengerVoiceContent.paint.shader = null
holder.tvPassengerVoiceContent.setTextColor(activity.resources.getColor(R.color.voice_resp))
holder.tvVoiceRes.text = voiceMsg.msg
holder.tvVoiceRes.visibility = View.VISIBLE
holder.tvPassengerVoiceContent.visibility = View.GONE
}else{
//用户说的
val mUserGradient = LinearGradient(
0f,
0f,
0f,
holder.tvPassengerVoiceContent.paint.textSize,
activity.resources.getColor(R.color.voice_user_start)
,activity.resources.getColor(R.color.voice_user_end),
Shader.TileMode.CLAMP
)
holder.tvPassengerVoiceContent.paint.setShader(mUserGradient)
holder.tvPassengerVoiceContent.text = voiceMsg.msg
holder.tvVoiceRes.visibility = View.GONE
holder.tvPassengerVoiceContent.visibility = View.VISIBLE
}
}
}
@@ -211,6 +203,7 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
//小智语音消息
class BubbleVoiceHolder(itemView: View): RecyclerView.ViewHolder(itemView){
var tvPassengerVoiceContent: AlignTextView = itemView.findViewById(R.id.tvPassengerVoiceContent)
var tvVoiceRes: AlignTwoTextView = itemView.findViewById(R.id.tvVoiceRes)
}
}

View File

@@ -732,10 +732,10 @@ internal class DebugSettingView @JvmOverloads constructor(
}
tbIsStrictMode?.also {
it.isChecked = SharedPrefs.getInstance(Utils.getApp())
it.isChecked = SharedPrefsMgr.getInstance(Utils.getApp())
.getBoolean("MOGO_STRICT_MODE_ENABLED", false)
it.setOnCheckedChangeListener { _, isChecked ->
SharedPrefs.getInstance(Utils.getApp())
SharedPrefsMgr.getInstance(Utils.getApp())
.putBoolean("MOGO_STRICT_MODE_ENABLED", isChecked)
scope.launch {
ToastUtils.showShort("配置生效, 2秒后重启应用...")
@@ -1686,21 +1686,10 @@ internal class DebugSettingView @JvmOverloads constructor(
*/
tvServerEnvironment.text = "当前服务器环境:${AppConfigInfo.netMode} -- ${
when (AppConfigInfo.netMode) {
2 -> {
"测试环境"
}
3 -> {
"生产环境"
}
4 -> {
"演示环境"
}
else -> {
"未知环境"
}
2 -> "测试环境"
3 -> "生产环境"
4 -> "演示环境"
else -> "未知环境"
}
}"
@@ -1791,18 +1780,17 @@ internal class DebugSettingView @JvmOverloads constructor(
}
tvCmdbCarInfoContent.text =
SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.CAR_INFO) ?: ""
//APP升级功能
tvAppHost.text = "HOST地址" + SharedPrefsMgr.getInstance(context)
.getString(SharedPrefsConstants.HOST_ADDRESS) ?: ""
.getString(SharedPrefsConstants.HOST_ADDRESS)
tvAppContent.text = "APP升级数据" + SharedPrefsMgr.getInstance(context)
.getString(SharedPrefsConstants.APP_UPGRADE_CONTENT) ?: ""
.getString(SharedPrefsConstants.APP_UPGRADE_CONTENT)
tvCarInfo.text =
"GPS时间${(mGnssInfo?.satelliteTime?.times(1000))?.toLong()}\n" +
"GPS时间${(mGnssInfo?.satelliteTime?.times(1000))}\n" +
"自车经纬度:\n${mGnssInfo?.longitude}\n${mGnssInfo?.latitude}\n"
tvCarInfoCopy.text =
"GPS时间${(mGnssInfo?.satelliteTime?.times(1000))?.toLong()}\n" +
"GPS时间${(mGnssInfo?.satelliteTime?.times(1000))}\n" +
"自车经纬度:\n${mGnssInfo?.longitude}\n${mGnssInfo?.latitude}\n"
tvIdentifyInfo.text =

View File

@@ -10,7 +10,7 @@ import com.mogo.eagle.core.data.temp.EventLogout
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.SharedPrefs
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
import com.mogo.eagle.core.utilcode.util.StringUtils
import kotlinx.android.synthetic.main.view_och_bus_operation.view.*
import org.greenrobot.eventbus.EventBus
@@ -28,7 +28,7 @@ class BusOperationView @JvmOverloads constructor(
init {
LayoutInflater.from(context).inflate(R.layout.view_och_bus_operation,this,true)
context?.let {
actvAccountPhone.text = phoneMask(SharedPrefs.getInstance(it).getString("och_account",""))
actvAccountPhone.text = phoneMask(SharedPrefsMgr.getInstance(it).getString("och_account",""))
}
clickPersonalRightView()
clickQRBtn()
@@ -69,7 +69,7 @@ class BusOperationView @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
context?.let {
actvAccountPhone.text = phoneMask(SharedPrefs.getInstance(it).getString("och_account",""))
actvAccountPhone.text = phoneMask(SharedPrefsMgr.getInstance(it).getString("och_account",""))
}
}

View File

@@ -5,6 +5,8 @@ import android.os.Looper;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.os.HandlerCompat;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.function.api.devatools.perf.IMoGoCpuUsageProvider;
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
import com.mogo.eagle.core.function.main.ARouterUtils;
@@ -24,12 +26,10 @@ public class ThreadOptInitializer {
private volatile boolean recorded = false;
private final ThreadLocal<Long> start = new ThreadLocal<>();
@Override
public boolean isEnabled() {
return true;
return FunctionBuildConfig.isSupportJunkDetect;
}

View File

@@ -14,20 +14,39 @@
<com.mogo.eagle.core.widget.AlignTextView
android:id="@+id/tvPassengerVoiceContent"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/sp_32"
android:textColor="#243959"
android:layout_marginTop="@dimen/dp_54"
android:layout_marginBottom="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_49"
android:layout_marginEnd="@dimen/dp_49"
android:maxWidth="@dimen/dp_502"
android:textStyle="bold"
android:gravity="start"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:visibility="gone"
/>
<com.mogo.eagle.core.widget.AlignTwoTextView
android:id="@+id/tvVoiceRes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/sp_32"
android:layout_marginTop="@dimen/dp_54"
android:textColor="@color/voice_resp"
android:layout_marginBottom="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_49"
android:layout_marginEnd="@dimen/dp_49"
android:maxWidth="@dimen/dp_502"
android:textStyle="bold"
android:gravity="start"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:visibility="gone"
/>
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>