[6.7.0][启自驾] feat: 增加启自驾父容器 View;

feat: 增驾调用 Och 自定义 view 接口&provider ;
This commit is contained in:
aibingbing
2024-09-19 15:11:06 +08:00
parent dfa8d8a644
commit 38a2bad999
8 changed files with 169 additions and 3 deletions

View File

@@ -0,0 +1,38 @@
package com.mogo.eagle.core.function.call.och
import android.content.Context
import android.view.View
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.function.api.och.IOchCustomViewProvider
/**
* @author aibingbing
*
* Och自定义View调用者管理类用来获取 Och提供的自定义 View, 然后放入到底层框架
*/
object CallerOchCustomViewManager {
const val TAG = "CallerOchCustomViewManager"
private val ochCustomViewProviderApi
get() = ARouter.getInstance().build(MogoServicePaths.PATH_OCH_CUSTOM_VIEW_API)
.navigation() as? IOchCustomViewProvider
fun init(context: Context) {
ochCustomViewProviderApi?.init(context)
}
/**
* 创建 Och业务层 自定义View
*/
fun getOchBusinessView(context: Context?): View? {
return ochCustomViewProviderApi?.createOchBusinessView(context)
}
/**
* 创建 自动自动驾驶 自定义 View
*/
fun getAutopilotView(context: Context?): View? {
return ochCustomViewProviderApi?.createStartAutopilotView(context)
}
}