[6.4.0][启自驾指引][埋点] 添加来源字段
This commit is contained in:
@@ -553,8 +553,8 @@ class DevaToolsProvider : IDevaToolsProvider, IAppStateListener {
|
||||
group.addView(child, ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT))
|
||||
}
|
||||
|
||||
override fun getExceptionStatusBeforeLaunchAutopilot(): Int {
|
||||
return StatusManager.getExceptionStatusBeforeLaunchAutopilot()
|
||||
override fun getExceptionStatusBeforeLaunchAutopilot(source: Int): Int {
|
||||
return StatusManager.getExceptionStatusBeforeLaunchAutopilot(source)
|
||||
}
|
||||
|
||||
override fun registerRouteDownloadListener(tag: String, block: (state: Int) -> Unit) {
|
||||
|
||||
@@ -248,7 +248,7 @@ internal class MoFangCommandExecutor {
|
||||
if (AppIdentityModeUtils.isSweeper(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerAutoPilotControlManager.startAutoPilotByMoFang(parameters)
|
||||
} else {
|
||||
if (CallerAutoPilotControlManager.isCanStartAutopilot(true)) {
|
||||
if (CallerAutoPilotControlManager.isCanStartAutopilot(true, -1)) {
|
||||
CallerAutoPilotControlManager.startAutoPilot(parameters)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ object StatusManager {
|
||||
listeners.remove(tag)
|
||||
}
|
||||
|
||||
fun getExceptionStatusBeforeLaunchAutopilot(): Int {
|
||||
fun getExceptionStatusBeforeLaunchAutopilot(source: Int): Int {
|
||||
if (!hasInit) {
|
||||
return 0
|
||||
}
|
||||
@@ -202,6 +202,7 @@ object StatusManager {
|
||||
"vehicle_start_autopilot_state_check",
|
||||
HashMap<String, Any>().also { itx ->
|
||||
itx["time"] = time
|
||||
itx["src"] = source
|
||||
itx["desc"] = ll.joinToString(",") { item ->
|
||||
when (item) {
|
||||
is SteerStatus -> "方向盘"
|
||||
|
||||
@@ -302,7 +302,7 @@ interface IDevaToolsProvider : IProvider {
|
||||
|
||||
fun attachAutopilotStatusView(ctx: Context, group: ViewGroup)
|
||||
|
||||
fun getExceptionStatusBeforeLaunchAutopilot(): Int
|
||||
fun getExceptionStatusBeforeLaunchAutopilot(source: Int): Int
|
||||
|
||||
fun registerRouteDownloadListener(tag: String, block:(state: Int) -> Unit)
|
||||
|
||||
|
||||
@@ -84,9 +84,9 @@ object CallerAutoPilotControlManager {
|
||||
/**
|
||||
* 启自驾前,是否要拦截
|
||||
* @param isShowTip true: 展示Toast+语音提示; false:不展示Toast+语音提示
|
||||
*
|
||||
* @param source -1: 蘑方发出启自驾前状态拦截;>=0 用于其它场景的判断
|
||||
*/
|
||||
fun isCanStartAutopilot(isShowTip: Boolean): Boolean {
|
||||
fun isCanStartAutopilot(isShowTip: Boolean, source: Int = 0): Boolean {
|
||||
/**
|
||||
* 方向盘: 1<<0
|
||||
* 油门 : 1<<1
|
||||
@@ -95,7 +95,7 @@ object CallerAutoPilotControlManager {
|
||||
* 档位: 1<<4
|
||||
* 轨迹下载: (下载中) 1<<5; (下载失败)1<<6
|
||||
*/
|
||||
val exceptionValue = CallerDevaToolsManager.getExceptionStatusBeforeLaunchAutopilot()
|
||||
val exceptionValue = CallerDevaToolsManager.getExceptionStatusBeforeLaunchAutopilot(source)
|
||||
if (exceptionValue != 0) {
|
||||
if (isShowTip) {
|
||||
val sb = StringBuilder("请检查车辆")
|
||||
|
||||
@@ -379,8 +379,8 @@ object CallerDevaToolsManager {
|
||||
devaToolsProviderApi?.unRegisterRouteDownloadListener(tag)
|
||||
}
|
||||
|
||||
fun getExceptionStatusBeforeLaunchAutopilot(): Int {
|
||||
return devaToolsProviderApi?.getExceptionStatusBeforeLaunchAutopilot() ?: 0
|
||||
fun getExceptionStatusBeforeLaunchAutopilot(source: Int): Int {
|
||||
return devaToolsProviderApi?.getExceptionStatusBeforeLaunchAutopilot(source) ?: 0
|
||||
}
|
||||
|
||||
fun registerStartAutopilotStateListener(tag: String, block: (isCanStartAutopilot: Boolean) -> Unit) {
|
||||
|
||||
Reference in New Issue
Block a user