[6.2.0] union the sp call

This commit is contained in:
zhongchao
2023-12-01 11:48:15 +08:00
parent ea80d84f84
commit 39cb22cc59
17 changed files with 58 additions and 230 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

@@ -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",""))
}
}