[Delete]移除MoGoWarningProvider.kt
Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -1,128 +0,0 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWaringProvider
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
import com.mogo.utils.logger.Logger
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/8/2 5:52 下午
|
||||
* 预警模块
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_HMI)
|
||||
class MoGoWarningProvider : IMoGoWaringProvider {
|
||||
private val TAG = "MoGoWarningProvider"
|
||||
private var mMoGoHmiFragment: MoGoHmiFragment? = null
|
||||
private var mContext: Context? = null
|
||||
override fun init(context: Context) {
|
||||
Logger.d(TAG, "初始化蘑菇预警模块 ……")
|
||||
mContext = context
|
||||
}
|
||||
|
||||
override fun createCoverage(activity: FragmentActivity?, containerId: Int?): Fragment? {
|
||||
Logger.d(TAG, "初始化蘑菇预警模块 Fragment……")
|
||||
mMoGoHmiFragment = MoGoHmiFragment()
|
||||
return mMoGoHmiFragment
|
||||
}
|
||||
|
||||
override val functionName: String
|
||||
get() = WaringConst.MODULE_NAME
|
||||
|
||||
override fun showWarningTrafficLight(checkLightId: Int) {
|
||||
mMoGoHmiFragment?.showWarningTrafficLight(checkLightId)
|
||||
}
|
||||
|
||||
override fun disableWarningTrafficLight() {
|
||||
mMoGoHmiFragment?.disableWarningTrafficLight()
|
||||
}
|
||||
|
||||
override fun showLimitingVelocity(limitingSpeed: Int) {
|
||||
mMoGoHmiFragment?.showLimitingVelocity(limitingSpeed)
|
||||
}
|
||||
|
||||
override fun disableLimitingVelocity() {
|
||||
mMoGoHmiFragment?.disableLimitingVelocity()
|
||||
}
|
||||
|
||||
override fun changeCountdownRed(redNum: Int) {
|
||||
mMoGoHmiFragment?.changeCountdownRed(redNum)
|
||||
}
|
||||
|
||||
override fun changeCountdownYellow(yellowNum: Int) {
|
||||
mMoGoHmiFragment?.changeCountdownYellow(yellowNum)
|
||||
}
|
||||
|
||||
override fun changeCountdownGreen(greenNum: Int) {
|
||||
mMoGoHmiFragment?.changeCountdownGreen(greenNum)
|
||||
}
|
||||
|
||||
override fun changeCountdownTrafficLightNum(readNum: Int, yellowNum: Int, greenNum: Int) {
|
||||
mMoGoHmiFragment?.changeCountdownTrafficLightNum(readNum, yellowNum, greenNum)
|
||||
}
|
||||
|
||||
override fun setSpeedChartViewVisibility(visibility: Int) {
|
||||
mMoGoHmiFragment?.setSpeedChartViewVisibility(visibility)
|
||||
}
|
||||
|
||||
override fun setAutopilotStatusViewVisibility(visibility: Int) {
|
||||
mMoGoHmiFragment?.setAutopilotStatusViewVisibility(visibility)
|
||||
}
|
||||
|
||||
override fun setPerspectiveSwitchViewVisibility(visibility: Int) {
|
||||
mMoGoHmiFragment?.setPerspectiveSwitchViewVisibility(visibility)
|
||||
}
|
||||
|
||||
override fun setCheckStatusViewVisibility(visibility: Int) {
|
||||
mMoGoHmiFragment?.setCheckStatusViewVisibility(visibility)
|
||||
}
|
||||
|
||||
override fun showWarningV2X(
|
||||
v2xType: Int, alertContent: String?,
|
||||
ttsContent: String?, tag: String?,
|
||||
listenerIMoGo: IMoGoWarningStatusListener?
|
||||
) {
|
||||
mMoGoHmiFragment?.showWarningV2X(v2xType, alertContent, ttsContent, tag, listenerIMoGo)
|
||||
}
|
||||
|
||||
override fun disableWarningV2X(tag: String?) {
|
||||
mMoGoHmiFragment?.disableWarningV2X(tag!!)
|
||||
}
|
||||
|
||||
override fun showWarning(direction: WarningDirectionEnum) {
|
||||
mMoGoHmiFragment?.showWarning(direction)
|
||||
}
|
||||
|
||||
override fun showWarning(direction: WarningDirectionEnum, closeTime: Long) {
|
||||
mMoGoHmiFragment?.showWarning(direction, closeTime)
|
||||
}
|
||||
|
||||
override fun showNoticeForTrafficWithData(pushData: NoticeTrafficStylePushData?) {
|
||||
if (pushData != null) {
|
||||
mMoGoHmiFragment?.showNoticeForTrafficWithData(pushData)
|
||||
};
|
||||
}
|
||||
|
||||
override fun showNoticeNormalData(normalData: NoticeNormalData?) {
|
||||
if (normalData != null) {
|
||||
mMoGoHmiFragment?.showNoticeNormalData(normalData)
|
||||
}
|
||||
}
|
||||
|
||||
override fun vipIdentification(visible: Boolean) {
|
||||
mMoGoHmiFragment?.vipIdentification(visible)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
Log.d(TAG, "onDestroy")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user