[6.2.0][Feat]调试面板新增无人化演练任务拉取时间
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.mogo.eagle.core.function.call.unmanned
|
||||
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.function.api.unmanned.IUnmannedListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 无人化功能状态监听、回调管理者
|
||||
*/
|
||||
object CallerUnmannedListenerManager:CallerBase<IUnmannedListener>() {
|
||||
private const val TAG = "CallerUnmannedListenerManager"
|
||||
|
||||
private var time: Int = 45
|
||||
|
||||
override fun doSomeAfterAddListener(tag: String, listener: IUnmannedListener) {
|
||||
super.doSomeAfterAddListener(tag, listener)
|
||||
listener.onPullTimeUpdate(time)
|
||||
}
|
||||
|
||||
fun dispatchPullTime(time: Int) {
|
||||
this.time = time
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
try {
|
||||
listener.onPullTimeUpdate(time)
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "转发消息出现异常:${e.message}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user