[6.6.0]
[common] [自驾埋点变更]
This commit is contained in:
@@ -8,6 +8,8 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.och.shuttle.fragment.ShuttleFragment
|
||||
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
|
||||
import com.mogo.och.shuttle.util.ShuttleAnalyticsEventKey
|
||||
|
||||
/**
|
||||
* 网约车小巴业务实现入口
|
||||
@@ -28,10 +30,12 @@ class ShuttleDriverProvider : CommonServiceImpl() {
|
||||
if(busFragment==null){
|
||||
busFragment = ShuttleFragment()
|
||||
}
|
||||
OchAutopilotAnalytics.ochEventKey = ShuttleAnalyticsEventKey.getInstance()
|
||||
return busFragment!!
|
||||
}
|
||||
|
||||
override fun resetFragment() {
|
||||
OchAutopilotAnalytics.ochEventKey = null
|
||||
busFragment = null
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.mogo.och.common.module.biz.login.LoginStatusManager;
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
|
||||
import com.mogo.och.common.module.constant.OchCommonConst;
|
||||
import com.mogo.och.common.module.manager.autopilot.OCHAdasAbilityManager;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.bean.ArrivedStation;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager;
|
||||
import com.mogo.och.common.module.manager.autopilot.line.LineManager;
|
||||
@@ -42,7 +43,6 @@ import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager;
|
||||
import com.mogo.och.common.module.manager.socket.cloud.action.OperateAction;
|
||||
import com.mogo.och.common.module.manager.socket.lan.LanSocketManager;
|
||||
import com.mogo.och.common.module.manager.socket.lan.LedScreenManager;
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.AppConnectMsg;
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.BaseDPMsg;
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.BusCacheKey;
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.BusinessType;
|
||||
@@ -69,7 +69,6 @@ import com.mogo.och.shuttle.callback.IRefreshBusStationsCallback;
|
||||
import com.mogo.och.shuttle.callback.ISlidePannelHideCallback;
|
||||
import com.mogo.och.shuttle.constant.BusConst;
|
||||
import com.mogo.och.shuttle.net.OrderServiceManager;
|
||||
import com.mogo.och.shuttle.util.BusAnalyticsManager;
|
||||
import com.mogo.och.shuttle.util.BusTrajectoryManager;
|
||||
import com.mogo.och.shuttle.util.ShuttleVoiceManager;
|
||||
|
||||
@@ -257,7 +256,7 @@ public class OrderModel {
|
||||
|
||||
@Override
|
||||
public void onStartAutopilotFailure(@NotNull String startFailedCode, @NonNull String startFailedMessage) {
|
||||
BusAnalyticsManager.getInstance().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();
|
||||
@@ -593,7 +592,15 @@ public class OrderModel {
|
||||
* @param isRestart
|
||||
*/
|
||||
private void startAutopilot(boolean isRestart, int leaveIndex) {
|
||||
BusAnalyticsManager.getInstance().triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
|
||||
/**
|
||||
* 存在Session
|
||||
*/
|
||||
if (!OchAutoPilotManager.canStartAutopilotBySessionId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
OchAutopilotAnalytics.INSTANCE.triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
|
||||
//1、判断轨迹url是否可用
|
||||
if(busRoutesResult!=null){
|
||||
@@ -617,7 +624,7 @@ public class OrderModel {
|
||||
}
|
||||
// 3、距离轨迹15m计算
|
||||
//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) {
|
||||
@@ -630,7 +637,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);
|
||||
@@ -1135,7 +1142,7 @@ public class OrderModel {
|
||||
}
|
||||
BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
|
||||
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
|
||||
BusAnalyticsManager.getInstance().triggerStartAutopilotEvent(isRestart, send,
|
||||
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotEvent(isRestart, send,
|
||||
currentStation.getName(), nextStation.getName(), busRoutesResult.getLineId(),"",System.currentTimeMillis());
|
||||
}
|
||||
|
||||
@@ -1143,7 +1150,7 @@ public class OrderModel {
|
||||
if (stationList == null || backgroundCurrentStationIndex >= stationList.size() - 1) {
|
||||
return;
|
||||
}
|
||||
BusAnalyticsManager.getInstance().triggerUpdateStartAutoPilotSessionId(sessionId);
|
||||
OchAutopilotAnalytics.INSTANCE.triggerUpdateStartAutoPilotSessionId(sessionId);
|
||||
}
|
||||
|
||||
public void triggerUnableStartAPReasonEvent() {
|
||||
@@ -1152,7 +1159,7 @@ public class OrderModel {
|
||||
}
|
||||
BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
|
||||
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
|
||||
BusAnalyticsManager.getInstance().triggerUnableStartAPReasonEvent(
|
||||
OchAutopilotAnalytics.INSTANCE.triggerUnableStartAPReasonEvent(
|
||||
currentStation.getName(), nextStation.getName(), String.valueOf(busRoutesResult.getLineId()),"",
|
||||
OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason());
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@ package com.mogo.och.shuttle.util;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchEventKey;
|
||||
|
||||
/**
|
||||
* OCH Bus埋点工具
|
||||
* <p>
|
||||
* Created on 2022/3/24
|
||||
*/
|
||||
public class BusAnalyticsManager extends OchAutopilotAnalytics {
|
||||
public class ShuttleAnalyticsEventKey implements IOchEventKey {
|
||||
|
||||
// 埋点key:开启自动驾驶前已识别的异常,会导致无法开启自驾
|
||||
private static final String EVENT_KEY_AP_UNABLE_START_REASON = "event_key_och_bus_ap_unable_start_reason";
|
||||
@@ -22,10 +22,10 @@ public class BusAnalyticsManager extends OchAutopilotAnalytics {
|
||||
private static final String EVENT_KEY_CLICK_START_AUTOPILOT = "event_key_och_shuttle_click_start_autopilot";
|
||||
|
||||
private static final class SingletonHolder {
|
||||
private static final BusAnalyticsManager INSTANCE = new BusAnalyticsManager();
|
||||
private static final ShuttleAnalyticsEventKey INSTANCE = new ShuttleAnalyticsEventKey();
|
||||
}
|
||||
|
||||
public static BusAnalyticsManager getInstance() {
|
||||
public static ShuttleAnalyticsEventKey getInstance() {
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user