[3.2.0][Fix]解决乘客屏断开连接的问题
This commit is contained in:
@@ -1,21 +1,32 @@
|
||||
package com.mogo.eagle.core.function.call.telematic
|
||||
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
object CallerTelematicListenerManager: CallerBase<IReceivedMsgListener>() {
|
||||
|
||||
private const val TAG = "CallerTelematicListenerManager"
|
||||
|
||||
fun invokeReceivedMsg(type: Int, byteArray: ByteArray) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onReceivedMsg(type, byteArray)
|
||||
try {
|
||||
listener.onReceivedMsg(type, byteArray)
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "转发消息出现异常:${e.message}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun dispatchServerSn(sn: String?) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onReceivedServerSn(sn)
|
||||
try {
|
||||
listener.onReceivedServerSn(sn)
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "转发司机屏SN出现异常:${e.message}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user