[6.6.0]
[common] [自驾埋点变更]
This commit is contained in:
@@ -5,8 +5,10 @@ import androidx.fragment.app.Fragment
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.och.bus.fragment.BusFragment
|
||||
import com.mogo.och.bus.util.BusAnalyticsManager
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.provider.CommonServiceImpl
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
|
||||
/**
|
||||
* 网约车小巴业务实现入口
|
||||
@@ -23,11 +25,13 @@ class BusDriverProvider : CommonServiceImpl() {
|
||||
if(busFragment==null){
|
||||
busFragment = BusFragment()
|
||||
}
|
||||
OchAutopilotAnalytics.ochEventKey = BusAnalyticsManager
|
||||
return busFragment!!
|
||||
}
|
||||
|
||||
override fun resetFragment() {
|
||||
busFragment = null
|
||||
OchAutopilotAnalytics.ochEventKey = null
|
||||
}
|
||||
|
||||
override fun init(context: Context) {
|
||||
|
||||
@@ -40,10 +40,10 @@ import com.mogo.och.bus.callback.ISlidePannelHideCallback;
|
||||
import com.mogo.och.bus.constant.BusConst;
|
||||
import com.mogo.och.bus.net.OrderServiceManager;
|
||||
import com.mogo.och.bus.presenter.BusModelLoopManager;
|
||||
import com.mogo.och.bus.util.BusAnalyticsManager;
|
||||
import com.mogo.och.bus.util.BusTrajectoryManager;
|
||||
import com.mogo.och.bus.util.BusVoiceManager;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics;
|
||||
import com.mogo.och.common.module.manager.autopilot.line.LineManager;
|
||||
import com.mogo.och.common.module.manager.socket.cloud.IOchOnMessageListener;
|
||||
import com.mogo.och.common.module.manager.socket.cloud.action.OperateAction2;
|
||||
@@ -400,7 +400,7 @@ public class OrderModel {
|
||||
|
||||
@Override
|
||||
public void onStartAutopilotFailure(@NotNull String startFailedCode, @NonNull String startFailedMessage) {
|
||||
BusAnalyticsManager.INSTANCE.triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage, System.currentTimeMillis());
|
||||
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage, System.currentTimeMillis());
|
||||
if (mADASStatusCallback != null && !FunctionBuildConfig.isDemoMode){
|
||||
CallerLogger.e( M_BUS + TAG, "mAdasStartFailureListener = "+startFailedMessage );
|
||||
mADASStatusCallback.onStartAdasFailure();
|
||||
@@ -678,7 +678,14 @@ public class OrderModel {
|
||||
*/
|
||||
private void startAutopilot(boolean isRestart, int leaveIndex) {
|
||||
|
||||
BusAnalyticsManager.INSTANCE.triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
/**
|
||||
* 存在Session
|
||||
*/
|
||||
if (!OchAutoPilotManager.canStartAutopilotBySessionId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
OchAutopilotAnalytics.INSTANCE.triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
|
||||
// 非自驾状态---->预写日志----> 启动自驾 ---> 自驾启动成功 ----> 上报日志
|
||||
// 自驾状态---->启动自驾 ---> 自驾启动成功
|
||||
@@ -704,7 +711,7 @@ public class OrderModel {
|
||||
FunctionBuildConfig.isPassStartAutopilotCommand);
|
||||
|
||||
//3、距离轨迹15m计算
|
||||
String resion = OchAutoPilotManager.canStartAutoPilot(busRoutesResult.getLineId());
|
||||
String resion = OchAutoPilotManager.canStartAutoPilotByDistance(busRoutesResult.getLineId());
|
||||
if(TrajectoryAndDistanceManager.errorTypeNoneLineId.equals(resion)){
|
||||
MogoLocation nextStationPoint = new MogoLocation();
|
||||
if (backgroundCurrentStationIndex < stationList.size() - 1) {
|
||||
@@ -717,7 +724,7 @@ public class OrderModel {
|
||||
currentStationPoint.setLongitude(busStationBean.getGcjLon());
|
||||
currentStationPoint.setLatitude(busStationBean.getGcjLat());
|
||||
setTrajectoryStation(currentStationPoint,nextStationPoint, (long)busRoutesResult.getLineId());
|
||||
resion = OchAutoPilotManager.canStartAutoPilot(busRoutesResult.getLineId());
|
||||
resion = OchAutoPilotManager.canStartAutoPilotByDistance(busRoutesResult.getLineId());
|
||||
}
|
||||
if(!StringUtils.isEmpty(resion)){
|
||||
ToastUtils.showShort(resion);
|
||||
@@ -1254,7 +1261,7 @@ public class OrderModel {
|
||||
}
|
||||
BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
|
||||
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
|
||||
BusAnalyticsManager.INSTANCE.triggerStartAutopilotEvent(isRestart, send,
|
||||
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotEvent(isRestart, send,
|
||||
currentStation.getName(), nextStation.getName(), currentLineId,"",System.currentTimeMillis());
|
||||
}
|
||||
|
||||
@@ -1262,7 +1269,7 @@ public class OrderModel {
|
||||
if (backgroundCurrentStationIndex >= stationList.size() - 1) {
|
||||
return;
|
||||
}
|
||||
BusAnalyticsManager.INSTANCE.triggerUpdateStartAutoPilotSessionId(sessionId);
|
||||
OchAutopilotAnalytics.INSTANCE.triggerUpdateStartAutoPilotSessionId(sessionId);
|
||||
}
|
||||
|
||||
public void triggerUnableStartAPReasonEvent() {
|
||||
@@ -1271,7 +1278,7 @@ public class OrderModel {
|
||||
}
|
||||
BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
|
||||
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
|
||||
BusAnalyticsManager.INSTANCE.triggerUnableStartAPReasonEvent(
|
||||
OchAutopilotAnalytics.INSTANCE.triggerUnableStartAPReasonEvent(
|
||||
currentStation.getName(), nextStation.getName(), String.valueOf(currentLineId),"",
|
||||
OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason());
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.mogo.och.bus.util
|
||||
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchEventKey
|
||||
|
||||
/**
|
||||
* OCH Bus埋点工具
|
||||
*
|
||||
* Created on 2022/3/24
|
||||
*/
|
||||
object BusAnalyticsManager: OchAutopilotAnalytics() {
|
||||
object BusAnalyticsManager: IOchEventKey {
|
||||
|
||||
// 埋点key:接管后点击'自动驾驶'按钮启动
|
||||
private const val EVENT_KEY_RESTART_AUTOPILOT = "event_key_och_bus_restart_autopilot"
|
||||
|
||||
Reference in New Issue
Block a user