[6.4.0][Fix]缓存下司机屏发送过来的SN并重新发送

This commit is contained in:
chenfufeng
2024-05-07 16:47:20 +08:00
parent 752c96897e
commit 636cc26256

View File

@@ -9,6 +9,15 @@ object CallerTelematicListenerManager: CallerBase<IReceivedMsgListener>() {
private const val TAG = "CallerTelematicListenerManager"
private var sn: String? = null
override fun doSomeAfterAddListener(tag: String, listener: IReceivedMsgListener) {
super.doSomeAfterAddListener(tag, listener)
if (!sn.isNullOrEmpty()) {
listener.onReceivedServerSn(sn)
}
}
fun invokeReceivedMsg(type: Int, byteArray: ByteArray) {
M_LISTENERS.forEach {
val listener = it.value
@@ -21,6 +30,7 @@ object CallerTelematicListenerManager: CallerBase<IReceivedMsgListener>() {
}
fun dispatchServerSn(sn: String?) {
this.sn = sn
M_LISTENERS.forEach {
val listener = it.value
try {