Merge branch 'dev_robotaxi-d-app-module_240_230131_2.14.0' into 'master'
Dev robotaxi d app module 240 230131 2.14.0 See merge request zhjt/AndroidApp/MoGoEagleEye!592
@@ -333,6 +333,11 @@ public class BusPassengerModel {
|
||||
|
||||
private final IMoGoAutopilotStatusListener mGoAutopilotStatusListener = new IMoGoAutopilotStatusListener(){
|
||||
|
||||
@Override
|
||||
public void onAutopilotRouteLineId(long lineId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotIpcConnectStatusChanged(int status, @Nullable String reason) {
|
||||
}
|
||||
@@ -426,7 +431,7 @@ public class BusPassengerModel {
|
||||
//找出前往站对应的轨迹点,拿出两站点的集合
|
||||
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "mRoutePoints.size() = " + mRoutePoints.size());
|
||||
if (mRoutePoints.size() > 0) {
|
||||
if (mStations.size() > 2){ //两个站点以上要计算两个站点间的估计路线
|
||||
if (mStations.size() > 1){ //改为两个站点及以上计算两个站点间的估计路线
|
||||
if (mNextStationIndex <= mStations.size()-1 && mNextStationIndex - 1 >=0){
|
||||
mTwoStationsRouts.clear();
|
||||
BusPassengerStation stationNext = mStations.get(mNextStationIndex);
|
||||
@@ -445,9 +450,6 @@ public class BusPassengerModel {
|
||||
mTwoStationsRouts.addAll(mRoutePoints.subList(currentRouteIndex,nextRouteIndex + 1));
|
||||
}
|
||||
}
|
||||
}else { //只有两个站点的时候整个路线就是两个站点之间的轨迹
|
||||
mTwoStationsRouts.clear();
|
||||
mTwoStationsRouts.addAll(mRoutePoints);
|
||||
}
|
||||
if (mTwoStationsRouts.size() > 0){
|
||||
float sumLength = CoordinateCalculateRouteUtil.calculateRouteSumLength(mTwoStationsRouts);
|
||||
|
||||
@@ -4,9 +4,7 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS
|
||||
import static com.mogo.och.bus.constant.BusConst.TIMER_START_AUTOPILOT_INTERVAL;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -21,12 +19,9 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener;
|
||||
@@ -39,24 +34,20 @@ import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.TrafficDataView;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.map.MogoMarkerManager;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener;
|
||||
import com.mogo.och.bus.R;
|
||||
import com.mogo.och.bus.bean.BusRoutesResult;
|
||||
import com.mogo.och.bus.constant.BusConst;
|
||||
import com.mogo.och.bus.model.BusOrderModel;
|
||||
import com.mogo.och.bus.util.BDRouteDataTestUtils;
|
||||
import com.mogo.och.bus.view.SlidePanelView;
|
||||
import com.mogo.och.common.module.utils.SoundPoolHelper;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -143,14 +134,16 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
//切换地图的远近视图
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()
|
||||
|| MogoMapUIController.getInstance().getCurrentMapVisualAngle().isRoma()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
if(FunctionBuildConfig.isRomaMode){
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
}
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(true);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
if (FunctionBuildConfig.isRomaMode) {
|
||||
MogoMapUIController.getInstance().setRomaMode(1);
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
MogoMapUIController.getInstance().setRomaMode(FunctionBuildConfig.romaModeStyle);
|
||||
} else {
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
|
||||
@@ -44,6 +44,8 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
|
||||
|
||||
/**
|
||||
* 网约车小巴界面
|
||||
@@ -536,4 +538,8 @@ public class BusFragment extends BaseBusTabFragment<BusFragment, BusPresenter>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBagManagerResult(@NonNull BagManagerOuterClass.BagManager bagManager) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,6 +267,11 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
onAutopilotStatusResponse(info);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRouteLineId(long lineId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotGuardian(MogoReportMsg.MogoReportMessage guardianInfo) {
|
||||
BusTrajectoryManager.getInstance().onAutopilotGuardian(guardianInfo);
|
||||
|
||||
@@ -11,11 +11,8 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListene
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotAbility;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics;
|
||||
|
||||
import chassis.Chassis;
|
||||
import system_master.SystemStatusInfo;
|
||||
|
||||
/**
|
||||
* Created on 2022/10/9
|
||||
@@ -77,36 +74,9 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotAbility(@Nullable AutopilotAbility ability) {
|
||||
isAutopilotAbility = true;
|
||||
autopilotAbilityReason = null;
|
||||
if (ability.gear == null || ability.gear == Chassis.GearPosition.GEAR_P ||
|
||||
ability.gear == Chassis.GearPosition.GEAR_R) {
|
||||
isAutopilotAbility = false;
|
||||
autopilotAbilityReason = "挡位不正常";
|
||||
}
|
||||
|
||||
if (DebugConfig.getProductFlavor() == "fPadLenovoOchBus" &&
|
||||
ability.gear == Chassis.GearPosition.GEAR_N){ //bus档位不正常
|
||||
isAutopilotAbility = false;
|
||||
autopilotAbilityReason = "挡位不正常";
|
||||
}
|
||||
|
||||
if (isAutopilotAbility)
|
||||
if (ability.brake > 0) {
|
||||
isAutopilotAbility = false;
|
||||
autopilotAbilityReason = "制动踏板被踩下";
|
||||
}
|
||||
if (isAutopilotAbility)
|
||||
if (ability.statusInfo.getSysState() == SystemStatusInfo.SystemState.SYS_STARTING) {
|
||||
isAutopilotAbility = false;
|
||||
autopilotAbilityReason = "系统正在启动";
|
||||
}
|
||||
if (isAutopilotAbility)
|
||||
if (ability.statusInfo.getSysState() == SystemStatusInfo.SystemState.SYS_EXITING) {
|
||||
isAutopilotAbility = false;
|
||||
autopilotAbilityReason = "系统正在关闭";
|
||||
}
|
||||
public void onAutopilotAbility(boolean isAutopilotAbility, String unableAutopilotReason) {
|
||||
this.isAutopilotAbility = isAutopilotAbility;
|
||||
this.autopilotAbilityReason = unableAutopilotReason;
|
||||
Logger.d(TAG, "是否可以启动自动驾驶=" + isAutopilotAbility + " 原因=" + autopilotAbilityReason);
|
||||
}
|
||||
|
||||
|
||||
@@ -162,6 +162,11 @@ public class SweeperPresenter extends Presenter<SweeperFragment>
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRouteLineId(long lineId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) {
|
||||
if (autopilotStatusInfo == null) return;
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.mogo.och.taxi.passenger.mulprocess.ICallback;
|
||||
interface ILeftMenuService {
|
||||
|
||||
/**
|
||||
* 向主进程传选中的item
|
||||
* Pass the selected item to the main process
|
||||
*/
|
||||
void transmissionIndex(int index);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.och.taxi.passenger.model;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.amap.api.services.core.AMapException;
|
||||
import com.amap.api.services.core.LatLonPoint;
|
||||
import com.amap.api.services.geocoder.GeocodeResult;
|
||||
import com.amap.api.services.geocoder.GeocodeSearch;
|
||||
@@ -52,8 +53,12 @@ public class TaxiPassengerGeocodeSearchModel implements GeocodeSearch.OnGeocodeS
|
||||
|
||||
public void initGeocodeSearch(){
|
||||
//通过经纬度逆地理编码得到位置
|
||||
mGeocodeSearch = new GeocodeSearch(mContext);
|
||||
mGeocodeSearch.setOnGeocodeSearchListener(this);
|
||||
try {
|
||||
mGeocodeSearch = new GeocodeSearch(mContext);
|
||||
mGeocodeSearch.setOnGeocodeSearchListener(this);
|
||||
} catch (AMapException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
timer = new Timer();
|
||||
timerTask = new TimerTask() {
|
||||
@Override
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
@@ -497,6 +498,10 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
|
||||
private final IMoGoAutopilotStatusListener mGoAutopilotStatusListener = new IMoGoAutopilotStatusListener(){
|
||||
|
||||
@Override
|
||||
public void onAutopilotRouteLineId(long lineId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotIpcConnectStatusChanged(int status, @Nullable String reason) {
|
||||
@@ -611,6 +616,26 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
};
|
||||
|
||||
private final IMsgBoxEventListener iMsgBoxEventListener = new IMsgBoxEventListener() {
|
||||
@Override
|
||||
public void onBubbleReportClickEvent(@NonNull MsgBoxBean msgBoxBean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBubbleV2XClickEvent(@NonNull MsgBoxBean msgBoxBean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBubbleOperationClickEvent(@NonNull MsgBoxBean msgBoxBean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateTipEvent(boolean isShow) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSummaryClickEvent() {
|
||||
if (mCurrentOCHOrder == null){
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.common.module.manager.OCHAdasAbilityManager;
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryRespBean;
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerScoreUpdateOrderReqBean;
|
||||
import com.mogo.och.taxi.passenger.callback.IOCHTaxiPassengerADASStatusCallback;
|
||||
@@ -42,6 +43,7 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
public BaseTaxiPassengerPresenter(TaxiPassengerBaseFragment view) {
|
||||
super(view);
|
||||
TaxiPassengerModel.getInstance().init(AbsMogoApplication.getApp());
|
||||
OCHAdasAbilityManager.getInstance().init(AbsMogoApplication.getApp());
|
||||
initListeners();
|
||||
}
|
||||
|
||||
@@ -57,6 +59,7 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
|
||||
releaseListeners();
|
||||
TaxiPassengerModel.getInstance().release();
|
||||
OCHAdasAbilityManager.getInstance().release();
|
||||
}
|
||||
|
||||
private void initListeners() {
|
||||
|
||||
@@ -130,14 +130,16 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
//视角切换
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()
|
||||
|| MogoMapUIController.getInstance().getCurrentMapVisualAngle().isRoma()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
if(FunctionBuildConfig.isRomaMode){
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
}
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(true);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
if (FunctionBuildConfig.isRomaMode) {
|
||||
MogoMapUIController.getInstance().setRomaMode(1);
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
MogoMapUIController.getInstance().setRomaMode(FunctionBuildConfig.romaModeStyle);
|
||||
} else {
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
|
||||
@@ -15,6 +15,8 @@ import android.widget.FrameLayout
|
||||
import android.widget.ListView
|
||||
import androidx.appcompat.widget.AppCompatImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
@@ -136,6 +138,7 @@ object OverlayLeftViewUtils {
|
||||
subscribeOVERVIEW = Observable.timer(300, TimeUnit.MILLISECONDS)
|
||||
.subscribe {
|
||||
EventBus.getDefault().post(UIStatus(UIStatus.OVERVIEW))
|
||||
CallerLogger.d(SceneConstant.M_TAXI_P + TAG, "发送Eventbus subscribeOVERVIEW")
|
||||
}
|
||||
}else{
|
||||
EventBus.getDefault().post(FinishActivity())
|
||||
|
||||
@@ -1146,6 +1146,11 @@ public class TaxiModel {
|
||||
|
||||
private final IMoGoAutopilotStatusListener mGoAutopilotStatusListener = new IMoGoAutopilotStatusListener() {
|
||||
|
||||
@Override
|
||||
public void onAutopilotRouteLineId(long lineId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotIpcConnectStatusChanged(int status, @Nullable String reason) {
|
||||
}
|
||||
|
||||
@@ -180,14 +180,16 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
try {
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()
|
||||
|| MogoMapUIController.getInstance().getCurrentMapVisualAngle().isRoma()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
if(FunctionBuildConfig.isRomaMode){
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
}
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(true);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
if (FunctionBuildConfig.isRomaMode) {
|
||||
MogoMapUIController.getInstance().setRomaMode(1);
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
MogoMapUIController.getInstance().setRomaMode(FunctionBuildConfig.romaModeStyle);
|
||||
} else {
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
|
||||
@@ -36,6 +36,8 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.List;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2021/1/18
|
||||
@@ -438,6 +440,10 @@ public class TaxiFragment extends BaseTaxiTabFragment<TaxiFragment, TaxiPresente
|
||||
testCurStopMd5DPQP.setText("SMd5DPQP:" + (order == null ? "" : order.txtFileMd5DPQP));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBagManagerResult(@NonNull BagManagerOuterClass.BagManager bagManager) {
|
||||
}
|
||||
//endregion
|
||||
|
||||
}
|
||||
|
||||
@@ -79,9 +79,7 @@ skinsupportimpl : "com.mogo.skin:skin-support-impl:${MOGO_COMMONS_V
|
||||
skinsupportnoop : "com.mogo.skin:skin-support-noop:${MOGO_COMMONS_VERSION}",
|
||||
skinsupportlight : "com.mogo.skin:skin-light:${MOGO_COMMONS_VERSION}",
|
||||
crashreport : "com.mogo.test:crashreport:${MOGO_COMMONS_VERSION}",
|
||||
crashreportbugly : "com.mogo.test:crashreport-bugly:${MOGO_COMMONS_VERSION}",
|
||||
crashreportnoop : "com.mogo.test:crashreport-noop:${MOGO_COMMONS_VERSION}",
|
||||
crashreportupgrade : "com.mogo.test:crashreport-upgrade:${MOGO_COMMONS_VERSION}",
|
||||
skinsupportbase : "com.mogo.skin:skin-support-base:${MOGO_COMMONS_VERSION}",
|
||||
skinsupportappcompat : "com.mogo.skin:skin-support-appcompat:${MOGO_COMMONS_VERSION}",
|
||||
skinsupportcardview : "com.mogo.skin:skin-support-cardview:${MOGO_COMMONS_VERSION}",
|
||||
|
||||
@@ -39,8 +39,8 @@ if (!isAndroidTestBuild()) {
|
||||
if (!isAndroidTestBuild()) {
|
||||
apply plugin: 'bytex.threadOpt'
|
||||
thread_opt {
|
||||
enable !isReleaseBuild
|
||||
enableInDebug !isReleaseBuild
|
||||
enable true
|
||||
enableInDebug true
|
||||
logLevel "DEBUG"
|
||||
}
|
||||
}
|
||||
@@ -50,15 +50,18 @@ if (!isAndroidTestBuild()) {
|
||||
LancetX {
|
||||
enable true
|
||||
enableInDebug true
|
||||
logLevel "DEBUG"
|
||||
|
||||
weaveGroup {
|
||||
leak_canary_crash_fix {
|
||||
enable !isReleaseBuild
|
||||
}
|
||||
|
||||
anr_fix {
|
||||
enable true
|
||||
}
|
||||
crash_fix {
|
||||
enable true
|
||||
}
|
||||
memory_leak {
|
||||
enable true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,72 +1 @@
|
||||
package com.mogo.launcher;
|
||||
|
||||
import com.mogo.eagle.core.function.main.MainMoGoApplication;
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.launcher.crash.CrashSystem;
|
||||
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-18
|
||||
* <p>
|
||||
* Launcher application
|
||||
*/
|
||||
public class MogoApplication extends MainMoGoApplication {
|
||||
|
||||
@Override
|
||||
protected void attachBaseContext(Context base) {
|
||||
super.attachBaseContext(base);
|
||||
// ThreadConfig.Builder builder = new ThreadConfig.Builder().listener(new ThreadConfig.TaskExecuteListener() {
|
||||
// @Override
|
||||
// public boolean isEnabled() {
|
||||
// return true; // 如果返回true,会有后续的回调;如果返回false, 不会有后续的回调
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onExecutorBefore(@NonNull Runnable runnable, @NonNull ThreadConfig.TaskType type) {
|
||||
// //每个任务执行前回调
|
||||
//// if (type == ThreadConfig.TaskType.HandlerThread) {
|
||||
////
|
||||
////
|
||||
//// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onExecutorAfter(@NonNull Runnable runnable, @NonNull ThreadConfig.TaskType type) {
|
||||
// //每个任务执行后回调
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * @param core 线程池的核心数
|
||||
// * @param max 线程池的最大线程数
|
||||
// * @param active 线程池正在活跃的任务数
|
||||
// * @param completed 线程池已完成的任务数
|
||||
// */
|
||||
// @Override
|
||||
// public void onExecutorStateChanged(@NonNull ThreadPoolExecutor pool, int core, int max, int active, long completed) {
|
||||
// //线程池在执行过程,状态变化回调
|
||||
// //Log.d("POOL", "core:" + core + ";max:" + max + ";active:" + active + ";completed:" + completed);
|
||||
// }
|
||||
// });
|
||||
// builder.loggable(false);
|
||||
// ThreadManager.INSTANCE.init(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initCrashConfig() {
|
||||
CrashSystem crashSystem = CrashSystem.getInstance(this);
|
||||
crashSystem.init();
|
||||
//设置debug模式,日志不上传
|
||||
crashSystem.setDebug(BuildConfig.DEBUG);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initLogConfig() {
|
||||
super.initLogConfig();
|
||||
Logger.init(BuildConfig.DEBUG ? LogLevel.DEBUG : LogLevel.OFF);
|
||||
}
|
||||
}
|
||||
package com.mogo.launcher;
|
||||
32
app/src/main/java/com/mogo/launcher/lancet/CrashFix.kt
Normal file
@@ -0,0 +1,32 @@
|
||||
package com.mogo.launcher.lancet
|
||||
|
||||
import android.content.ComponentName
|
||||
import android.content.Intent
|
||||
import androidx.annotation.*
|
||||
import com.knightboost.lancet.api.Origin
|
||||
import com.knightboost.lancet.api.Scope.ALL
|
||||
import com.knightboost.lancet.api.Scope.LEAF
|
||||
import com.knightboost.lancet.api.annotations.*
|
||||
|
||||
@Keep
|
||||
@Weaver
|
||||
@Group("crash_fix")
|
||||
class CrashFix {
|
||||
|
||||
/**
|
||||
* 修正Android8.0及之后,后台启动Service引起的崩溃
|
||||
* java.lang.IllegalStateException: Not allowed to start service Intent {
|
||||
* act=com.zhidao.cosupload.service.UPLOAD_ACTION cmp=com.mogo.launcher.f/com.zhidao.cosupload.service.UploadService }: app is in background uid UidRecord{6443b7b u0a404 LAST bg:+1m15s362ms idle change:idle procs:1 seq(0,0,0)}
|
||||
*/
|
||||
@Insert(mayCreateSuper = true)
|
||||
@TargetClass("android.content.Context", scope = LEAF)
|
||||
@TargetMethod(methodName = "startService")
|
||||
fun fixStartServiceCrash(intent: Intent): ComponentName? {
|
||||
return try {
|
||||
Origin.call() as ComponentName?
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
null
|
||||
}
|
||||
}
|
||||
}
|
||||
140
app/src/main/java/com/mogo/launcher/lancet/MemoryLeakFix.kt
Normal file
@@ -0,0 +1,140 @@
|
||||
package com.mogo.launcher.lancet
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.Dialog
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import androidx.annotation.*
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.fragment.app.*
|
||||
import androidx.lifecycle.*
|
||||
import androidx.lifecycle.Lifecycle.Event
|
||||
import androidx.lifecycle.Lifecycle.Event.ON_DESTROY
|
||||
import com.knightboost.lancet.api.*
|
||||
import com.knightboost.lancet.api.annotations.*
|
||||
import com.knightboost.lancet.api.annotations.Weaver
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import io.netty.util.internal.ConcurrentSet
|
||||
import java.lang.ref.*
|
||||
import java.lang.reflect.Modifier
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
@Keep
|
||||
@Weaver
|
||||
@Group("memory_leak")
|
||||
class MemoryLeakFix {
|
||||
|
||||
@Insert
|
||||
@ImplementedInterface("java.lang.Runnable")
|
||||
@TargetMethod(methodName = "run")
|
||||
fun runProxy() {
|
||||
if (AccessSyntheticUtils.isTargetAlive(This.get())) {
|
||||
Origin.callVoid()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class AccessSyntheticUtils {
|
||||
|
||||
companion object {
|
||||
|
||||
private val fields = ConcurrentHashMap<String, WeakReference<Any>>()
|
||||
private val observers = ConcurrentSet<String>()
|
||||
|
||||
@JvmStatic
|
||||
fun isTargetAlive(obj: Any): Boolean {
|
||||
try {
|
||||
val clazz = obj.javaClass
|
||||
if (!clazz.isAnonymousClass) {
|
||||
return true
|
||||
}
|
||||
val key = clazz.name
|
||||
return (fields[key] ?: clazz.declaredFields.find {
|
||||
it.isSynthetic &&
|
||||
((it.modifiers and Modifier.STATIC) == 0) &&
|
||||
(View::class.java.isAssignableFrom(it.type) or
|
||||
Context::class.java.isAssignableFrom(it.type) or
|
||||
Fragment::class.java.isAssignableFrom(it.type) or
|
||||
android.app.Fragment::class.java.isAssignableFrom(it.type) or
|
||||
Dialog::class.java.isAssignableFrom(it.type)
|
||||
)
|
||||
}?.let {
|
||||
it.isAccessible = true
|
||||
val wf = WeakReference(it.get(obj), ReferenceQueue())
|
||||
fields[key] = wf
|
||||
wf
|
||||
})?.also {
|
||||
if (it.isEnqueued) {
|
||||
//对像被垃圾回收了
|
||||
fields.remove(key)
|
||||
}
|
||||
}?.get()?.let { t ->
|
||||
var lifecycle: Lifecycle? = null
|
||||
val ret = when (t) {
|
||||
is View -> {
|
||||
lifecycle = t.lifecycleOwner.lifecycle
|
||||
ViewCompat.isAttachedToWindow(t)
|
||||
}
|
||||
is Activity -> {
|
||||
lifecycle = t.findViewById<View>(android.R.id.content)?.lifecycleOwner?.lifecycle
|
||||
!t.isFinishing && !t.isDestroyed
|
||||
}
|
||||
is Fragment -> {
|
||||
lifecycle = t.lifecycle
|
||||
!t.isDetached
|
||||
}
|
||||
is android.app.Fragment -> {
|
||||
lifecycle = t.view?.lifecycleOwner?.lifecycle
|
||||
!t.isDetached
|
||||
}
|
||||
is Dialog -> {
|
||||
t.window?.decorView?.let {
|
||||
v ->
|
||||
lifecycle = v.lifecycleOwner.lifecycle
|
||||
ViewCompat.isAttachedToWindow(v)
|
||||
} ?: false
|
||||
}
|
||||
else -> {
|
||||
true
|
||||
}
|
||||
}
|
||||
if (!ret) {
|
||||
assignFinalFieldNull(obj, t.javaClass)
|
||||
} else {
|
||||
val l = lifecycle
|
||||
if (l != null && !observers.contains(key)) {
|
||||
observers.add(key)
|
||||
l.addObserver(object : LifecycleEventObserver {
|
||||
override fun onStateChanged(source: LifecycleOwner, event: Event) {
|
||||
if (event == ON_DESTROY) {
|
||||
assignFinalFieldNull(obj, t.javaClass)
|
||||
observers.remove(key)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
ret
|
||||
} ?: true
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
private fun assignFinalFieldNull(obj: Any, fieldType: Class<*>) {
|
||||
try {
|
||||
obj.javaClass.declaredFields.find {
|
||||
it.isSynthetic &&
|
||||
((it.modifiers and Modifier.STATIC) == 0) && it.type == fieldType
|
||||
}?.also {
|
||||
it.isAccessible = true
|
||||
it.set(obj, null)
|
||||
}
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,10 @@ package com.mogo.launcher.stageone
|
||||
import android.content.Context
|
||||
import com.rousetime.android_startup.AndroidStartup
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.test.crashreport.upgrade.UpgradeReportConstants
|
||||
import com.mogo.test.crashreport.CrashReportConstants
|
||||
|
||||
class APMStartup : AndroidStartup<Boolean?>() {
|
||||
override fun create(context: Context): Boolean? {
|
||||
// bugly
|
||||
ARouter.getInstance().build(UpgradeReportConstants.PATH).navigation()
|
||||
// apm
|
||||
ARouter.getInstance().build(CrashReportConstants.PATH).navigation()
|
||||
return true
|
||||
|
||||
@@ -113,7 +113,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
// 使用中台长链接
|
||||
clientConfig.isUseOriginSocket = true
|
||||
// 设置是否输出网络日志
|
||||
clientConfig.isShowNetDebugLog = false
|
||||
clientConfig.isShowNetDebugLog = true
|
||||
// 设置是否是直播推流的主播
|
||||
clientConfig.isAnchor = true
|
||||
when (DebugConfig.getCarMachineType()) {
|
||||
|
||||
@@ -36,7 +36,10 @@ public class ConfigAdapter extends BaseAdapter<Config, ConfigAdapter.ViewHolder>
|
||||
}
|
||||
viewHolder.name.setText(data.name);
|
||||
viewHolder.value.setText(data.value);
|
||||
|
||||
if (data.color == -1) {
|
||||
data.color = R.color.colorSlateGray;
|
||||
}
|
||||
viewHolder.value.setTextColor(mContext.getResources().getColor(data.color));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -48,6 +48,10 @@ public abstract class BaseAdapter<D, VH extends BaseViewHolder> extends Recycler
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public List<D> getData() {
|
||||
return mDatas;
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener<D> listener) {
|
||||
mItemClick = listener;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,26 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class Config {
|
||||
public final String name;
|
||||
public final String value;
|
||||
public String value;
|
||||
public int color = -1;
|
||||
|
||||
public Config(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Config config = (Config) o;
|
||||
return Objects.equals(name, config.name);
|
||||
}
|
||||
|
||||
public void cover(Config config) {
|
||||
this.value = config.value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,6 @@ import com.zhidao.support.adas.high.AdasOptions;
|
||||
import com.zhidao.support.adas.high.OnAdasConnectStatusListener;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.OnMultiDeviceListener;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotAbility;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
@@ -113,7 +112,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
import chassis.Chassis;
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import io.netty.channel.Channel;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
@@ -170,8 +169,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
private ListPopupWindow listPopupWindow;
|
||||
private FloatWindow floatWindow;
|
||||
private View include_title;
|
||||
private boolean isAutopilotAbility = true;
|
||||
private String autopilotAbilityReason;
|
||||
private List<SpecialVehicleBean> specialVehicleBeanList;//特种车辆
|
||||
// @Override
|
||||
// protected void onStart() {
|
||||
@@ -821,47 +818,12 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotAbility(AutopilotAbility ability) {
|
||||
isAutopilotAbility = true;
|
||||
autopilotAbilityReason = null;
|
||||
if (ability.gear == null || ability.gear == Chassis.GearPosition.GEAR_P || ability.gear == Chassis.GearPosition.GEAR_R) {
|
||||
isAutopilotAbility = false;
|
||||
autopilotAbilityReason = "挡位不正常";
|
||||
public void onAutopilotAbility(boolean isAutopilotAbility, String unableAutopilotReason) {
|
||||
if (fromFragment instanceof VersionFragment) {
|
||||
VersionFragment fragment = (VersionFragment) fromFragment;
|
||||
fragment.autopilotAbility(isAutopilotAbility, unableAutopilotReason);
|
||||
}
|
||||
if (isAutopilotAbility)
|
||||
if (ability.brake > 0) {
|
||||
isAutopilotAbility = false;
|
||||
autopilotAbilityReason = "制动踏板被踩下";
|
||||
}
|
||||
if (isAutopilotAbility)
|
||||
if (ability.statusInfo == null) {
|
||||
isAutopilotAbility = false;
|
||||
autopilotAbilityReason = "系统Topic不正常";
|
||||
}
|
||||
if (isAutopilotAbility)
|
||||
if (ability.statusInfo.getSysState() == SystemStatusInfo.SystemState.SYS_STARTING) {
|
||||
isAutopilotAbility = false;
|
||||
autopilotAbilityReason = "系统正在启动";
|
||||
}
|
||||
if (isAutopilotAbility)
|
||||
if (ability.statusInfo.getSysState() == SystemStatusInfo.SystemState.SYS_EXITING) {
|
||||
isAutopilotAbility = false;
|
||||
autopilotAbilityReason = "系统正在关闭";
|
||||
}
|
||||
if (isAutopilotAbility)
|
||||
if (ability.statusInfo.getSysState() == SystemStatusInfo.SystemState.SYS_FAULT) {
|
||||
isAutopilotAbility = false;
|
||||
autopilotAbilityReason = "系统异常";
|
||||
}
|
||||
if (isAutopilotAbility)
|
||||
for (SystemStatusInfo.HealthInfo healthInfo : ability.statusInfo.getHealthInfoList()) {
|
||||
if (healthInfo.getState() == SystemStatusInfo.HealthState.FAULT) {
|
||||
isAutopilotAbility = false;
|
||||
autopilotAbilityReason = healthInfo.getName() + " 节点异常";
|
||||
break;
|
||||
}
|
||||
}
|
||||
Log.i(TAG, "是否可以启动自动驾驶=" + isAutopilotAbility + " 原因=" + autopilotAbilityReason);
|
||||
Log.i(TAG, "是否可以启动自动驾驶=" + isAutopilotAbility + " 原因=" + unableAutopilotReason);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -966,7 +928,12 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
BasicInfoReq info = new BasicInfoReq(header, basicInfoReq, sdf);
|
||||
DataDistribution.getInstance().addData(info);
|
||||
AdasManager.getInstance().sendBasicInfoResp("", 0, com.zhidao.support.adas.high.common.Constants.TERMINAL_ROLE.DEBUG);
|
||||
showToastCenter("收到车机基础信息请求:" + info.toString());
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
showToastCenter("收到车机基础信息请求:" + info.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1025,6 +992,11 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBagManagerCmd(MessagePad.Header header, BagManagerOuterClass.BagManager bagManager) {
|
||||
|
||||
}
|
||||
|
||||
private void initAdas() {
|
||||
CupidLogUtils.e(TAG, "--->初始化");
|
||||
AdasOptions options;
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.zhidao.adas.client.adapter.InterfaceAdapter;
|
||||
import com.zhidao.adas.client.base.BaseFragment;
|
||||
import com.zhidao.adas.client.bean.Config;
|
||||
import com.zhidao.adas.client.bean.InterfaceModel;
|
||||
import com.zhidao.adas.client.utils.RandomColor;
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
@@ -213,10 +214,44 @@ public class VersionFragment extends BaseFragment {
|
||||
}
|
||||
list.add(new Config("ADAS LIB版本:", AdasManager.getInstance().getAdasVersion()));
|
||||
list.add(new Config("APP构建时间:", BuildConfig.BUILD_TIME));
|
||||
list.add(getAutopilotAbilityConfig(""));
|
||||
adapter.setData(list);
|
||||
}
|
||||
|
||||
private Config getAutopilotAbilityConfig(String value) {
|
||||
return new Config("能否启动自动驾驶:", value);
|
||||
}
|
||||
|
||||
public void autopilotAbility(boolean isAutopilotAbility, String unableAutopilotReason) {
|
||||
List<Config> list = adapter.getData();
|
||||
if (list != null) {
|
||||
Config temp = getAutopilotAbilityConfig(isAutopilotAbility + ",原因:" + unableAutopilotReason);
|
||||
int index = list.indexOf(temp);
|
||||
if (index < 0) {
|
||||
list.add(temp);
|
||||
if (getActivity() != null)
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
adapter.notifyItemInserted(list.size() - 1);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Config config = list.get(index);
|
||||
config.cover(temp);
|
||||
config.color = RandomColor.randomColor();
|
||||
if (getActivity() != null)
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
adapter.notifyItemChanged(index);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void onRefreshView() {
|
||||
showVersion();
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.zhidao.adas.client.utils;
|
||||
|
||||
import com.zhidao.adas.client.R;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
public class RandomColor {
|
||||
//随机颜色,且不与上一次重复
|
||||
private static Random randomColor;
|
||||
private static int tempColorIndex;
|
||||
private static int[] colors = {R.color.color1, R.color.color2, R.color.color3, R.color.color4, R.color.color5};
|
||||
|
||||
public static int randomColor() {
|
||||
randomColorTemp();
|
||||
return colors[tempColorIndex];
|
||||
}
|
||||
|
||||
private static void randomColorTemp() {
|
||||
if (randomColor == null)
|
||||
randomColor = new Random();
|
||||
int colorInt = randomColor.nextInt(colors.length);
|
||||
if (tempColorIndex == colorInt) {
|
||||
randomColorTemp();
|
||||
} else {
|
||||
tempColorIndex = colorInt;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,4 +17,9 @@
|
||||
<color name="connect_status_connecting">#FF00FF</color>
|
||||
<color name="connect_status_disconnecting">#DAA520</color>
|
||||
<color name="connect_status_search_address">#1E90FF</color>
|
||||
<color name="color1">#FFC0CB</color>
|
||||
<color name="color2">#FF8F00</color>
|
||||
<color name="color3">#FFE500</color>
|
||||
<color name="color4">#B9ED3E</color>
|
||||
<color name="color5">#2EEDEB</color>
|
||||
</resources>
|
||||
|
||||
@@ -44,7 +44,6 @@ import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.AdasOptions;
|
||||
import com.zhidao.support.adas.high.OnAdasConnectStatusListener;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotAbility;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS;
|
||||
@@ -64,6 +63,7 @@ import java.util.Locale;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.v2x.ObuWarningEvent;
|
||||
@@ -544,6 +544,11 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBagManagerCmd(MessagePad.Header header, BagManagerOuterClass.BagManager bagManager) {
|
||||
|
||||
}
|
||||
|
||||
private void initAdas() {
|
||||
CupidLogUtils.e(TAG, "--->初始化");
|
||||
AdasOptions options;
|
||||
@@ -812,10 +817,11 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotAbility(AutopilotAbility ability) {
|
||||
public void onAutopilotAbility(boolean isAutopilotAbility, String unableAutopilotReason) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onStartAutopilotFailed(MogoReportMsg.MogoReportMessage message) {
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ buildscript {
|
||||
classpath 'com.mogo.cloud:systrace:1.0.1'
|
||||
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18'
|
||||
classpath 'com.mogo.sticky:service:1.0.8'
|
||||
classpath 'io.github.knight-zxw:lancet-plugin:0.0.1'
|
||||
classpath 'io.github.knight-zxw:lancet-plugin:0.0.4_mogo'
|
||||
|
||||
// classpath ("com.tencent.matrix:matrix-gradle-plugin:0.6.6") { changing = true }
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@ ext {
|
||||
// amapnavi3dmap : "com.amap.api:navi-3dmap:8.0.1_3dmap8.0.1",
|
||||
// amapsearch : "com.amap.api:search:7.9.0",
|
||||
// amaplocation : "com.amap.api:location:5.5.0",
|
||||
amapnavi3dmap : "com.amap.api:navi-3dmap:8.0.1_3dmap8.0.1",
|
||||
amapsearch : "com.amap.api:search:7.1.0",
|
||||
amaplocation : "com.amap.api:location:5.3.1",
|
||||
amapnavi3dmap : "com.amap.api:navi-3dmap:9.5.1_3dmap9.5.0",
|
||||
amapsearch : "com.amap.api:search:9.5.0",
|
||||
amaplocation : "com.amap.api:location:6.2.0",
|
||||
// json 转换
|
||||
gson : "com.google.code.gson:gson:2.8.4",
|
||||
// 内存泄漏检测
|
||||
@@ -97,9 +97,7 @@ ext {
|
||||
|
||||
// obu sdk
|
||||
obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3",
|
||||
mogoobuold : 'com.zhidao.support.obu:mogoobu:1.0.0.33',
|
||||
mogoobu : 'com.mogo.support.obu:mogo-obu:1.0.6',
|
||||
mogoami : 'com.zhidao.support.obu.ami:mogoami:1.0.0.24',
|
||||
|
||||
// google
|
||||
googlezxing : "com.google.zxing:core:3.3.3",
|
||||
@@ -149,10 +147,8 @@ ext {
|
||||
mogologlib : "com.mogo.module:module-loglib:${LOGLIB_VERSION}",
|
||||
kotlingradleplugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}",
|
||||
crashreport : "com.mogo.test:crashreport:${CRASHREPORT_VERSION}",
|
||||
crashreportbugly : "com.mogo.test:crashreport-bugly:${CRASHREPORT_BUGLY_VERSION}",
|
||||
crashreportapmbyte : "com.mogo.test:crashreport-apmbyte:${CRASHREPORT_APMBYTE_VERSION}",
|
||||
crashreportnoop : "com.mogo.test:crashreport-noop:${CRASHREPORT_NOOP_VERSION}",
|
||||
crashreportupgrade : "com.mogo.test:crashreport-upgrade:${CRASHREPORT_UPGRADE_VERSION}",
|
||||
apm_insight : 'com.volcengine:apm_insight:1.4.9.cn-rc.5',
|
||||
apm_insight_crash : 'com.volcengine:apm_insight_crash:1.4.6-rc.14',
|
||||
cicle_indicator : 'me.relex:circleindicator:2.1.6',
|
||||
@@ -241,7 +237,7 @@ ext {
|
||||
|
||||
|
||||
//========================= LancetX ===================
|
||||
lancetx_runtime : "io.github.knight-zxw:lancet-runtime:0.0.1",
|
||||
lancetx_runtime : "io.github.knight-zxw:lancet-runtime:0.0.4_mogo",
|
||||
|
||||
//========================= autosize ======================
|
||||
androidautoSize : 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1',
|
||||
|
||||
@@ -51,7 +51,6 @@ dependencies {
|
||||
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
implementation rootProject.ext.dependencies.mogoami
|
||||
implementation rootProject.ext.dependencies.mogoaicloudtelematic
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
|
||||
@@ -4,12 +4,14 @@ import android.Manifest.permission
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import androidx.annotation.RequiresPermission
|
||||
import bag_manager.BagManagerOuterClass
|
||||
import chassis.SpecialVehicleTaskCmdOuterClass
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.mogo.eagle.core.data.autopilot.toAutoPilotLine
|
||||
import com.mogo.eagle.core.data.autopilot.toRouteInfo
|
||||
import com.mogo.eagle.core.data.badcase.BagManagerEntity
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
@@ -54,6 +56,7 @@ import com.zhidao.support.adas.high.common.Constants
|
||||
import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils
|
||||
import com.zhidao.support.adas.high.common.MogoReport
|
||||
import com.zhidao.support.adas.high.msg.BagManagerMessage
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants
|
||||
import io.netty.channel.Channel
|
||||
@@ -106,6 +109,7 @@ class MoGoAutopilotProvider :
|
||||
.setIpcConnectionMode(AdasOptions.IPC_CONNECTION_MODE.FIXATION)
|
||||
.setIpcFixationIP(AdasManager.getInstance().getIPCFixationIPList(mContext))
|
||||
.setClient(false)
|
||||
.setIdentityMode(FunctionBuildConfig.appIdentityMode)
|
||||
// .setSubscribeInterfaceOptions(subscribeInterfaceOptions)//
|
||||
.build()
|
||||
|
||||
@@ -196,6 +200,7 @@ class MoGoAutopilotProvider :
|
||||
val options = AdasOptions
|
||||
.Builder()
|
||||
.setClient(true)
|
||||
.setIdentityMode(FunctionBuildConfig.appIdentityMode)
|
||||
.build()
|
||||
AdasManager.getInstance()
|
||||
.create(options, MoGoAdasMsgConnectStatusListenerImpl())
|
||||
@@ -223,6 +228,7 @@ class MoGoAutopilotProvider :
|
||||
.setIpcConnectionMode(AdasOptions.IPC_CONNECTION_MODE.FIXATION)
|
||||
.setIpcFixationIP(AdasManager.getInstance().getIPCFixationIPList(mContext))
|
||||
.setClient(false)// 乘客端直连工控机改为false
|
||||
.setIdentityMode(FunctionBuildConfig.appIdentityMode)
|
||||
.build()
|
||||
AdasManager.getInstance().create(options, MoGoAdasMsgConnectStatusListenerImpl())
|
||||
//////////////////////////////////注意先后顺序,AdasManager.getInstance().create后才可以设置监听/////////////////////////////////////////////
|
||||
@@ -544,6 +550,105 @@ class MoGoAutopilotProvider :
|
||||
return AdasManager.getInstance().sendRecordDataConfigReq(reqType, recordType, topicsNeedToCache)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取Bag包管理信息
|
||||
* @param bagManagerEntity 包管理请求实体类
|
||||
*/
|
||||
override fun sendBagManagerCmd(bagManagerEntity: BagManagerEntity): Boolean {
|
||||
val bagManager = BagManagerOuterClass.BagManager
|
||||
.newBuilder()
|
||||
.setReqType(bagManagerEntity.reqType)
|
||||
.setKeyReq(bagManagerEntity.keyReq)
|
||||
|
||||
// 更新包附加信息,发送请求且reqType=5时有效
|
||||
val descReq = BagManagerOuterClass.BagDescription
|
||||
.newBuilder()
|
||||
bagManagerEntity.descReq?.let {
|
||||
descReq.description = it.description
|
||||
descReq.hasAudio = it.hasAudio
|
||||
descReq.audioUrl = it.audioUrl
|
||||
descReq.setReportBI(it.reportBI)
|
||||
}
|
||||
bagManager.descReq = descReq.build()
|
||||
|
||||
// 空间使用信息,获取响应且reqType=1时有效
|
||||
for(diskSpaceInfoEntity in bagManagerEntity.spaceInfoResp){
|
||||
val spaceInfoResp = BagManagerOuterClass.BagSpaceInfo
|
||||
.newBuilder()
|
||||
val diskSpaceInfo = BagManagerOuterClass.SpaceInfo
|
||||
.newBuilder()
|
||||
.setDirectory(diskSpaceInfoEntity.diskSpaceInfo.directory)
|
||||
.setTotal(diskSpaceInfoEntity.diskSpaceInfo.total)
|
||||
.setFree(diskSpaceInfoEntity.diskSpaceInfo.free)
|
||||
.setUsed(diskSpaceInfoEntity.diskSpaceInfo.used)
|
||||
.build()
|
||||
spaceInfoResp
|
||||
.setHost(diskSpaceInfoEntity.host).diskSpaceInfo = diskSpaceInfo
|
||||
for(entity in diskSpaceInfoEntity.BagDirsSpaceInfo){
|
||||
val bagDirsSpaceInfo = BagManagerOuterClass.SpaceInfo
|
||||
.newBuilder()
|
||||
.setDirectory(entity.directory)
|
||||
.setTotal(entity.total)
|
||||
.setFree(entity.free)
|
||||
.setUsed(entity.used)
|
||||
.build()
|
||||
spaceInfoResp.addBagDirsSpaceInfo(bagDirsSpaceInfo)
|
||||
}
|
||||
bagManager.addSpaceInfoResp(spaceInfoResp.build())
|
||||
}
|
||||
|
||||
// 包信息列表,获取响应且reqType=2时有效
|
||||
for(bagsInfoRespEntity in bagManagerEntity.bagsInfoResp){
|
||||
if(bagsInfoRespEntity.itemType == 0){
|
||||
// 包描述信息
|
||||
val bagDescription = BagManagerOuterClass.BagDescription
|
||||
.newBuilder()
|
||||
bagsInfoRespEntity.description?.let {
|
||||
bagDescription.description = it.description
|
||||
bagDescription.hasAudio = it.hasAudio
|
||||
bagDescription.audioUrl = it.audioUrl
|
||||
bagDescription.setReportBI(it.reportBI)
|
||||
}
|
||||
|
||||
val bagsInfoResp = BagManagerOuterClass.BagInfo
|
||||
.newBuilder()
|
||||
.setKey(bagsInfoRespEntity.key)
|
||||
.setTotalSize(bagsInfoRespEntity.totalSize)
|
||||
.setTimestamp(bagsInfoRespEntity.timestamp)
|
||||
.setBagPath(bagsInfoRespEntity.bagPath)
|
||||
.setMergeStat(bagsInfoRespEntity.mergeStat)
|
||||
.setUploadStat(bagsInfoRespEntity.uploadStat)
|
||||
.setDescription(bagDescription.build())
|
||||
|
||||
// 子包信息
|
||||
for(subBagEntity in bagsInfoRespEntity.subBags){
|
||||
val subBag = BagManagerOuterClass.SubBag
|
||||
.newBuilder()
|
||||
.setKey(subBagEntity.key)
|
||||
.setHost(subBagEntity.host)
|
||||
.setSize(subBagEntity.size)
|
||||
.build()
|
||||
bagsInfoResp.addSubBags(subBag)
|
||||
}
|
||||
bagManager.addBagsInfoResp(bagsInfoResp)
|
||||
}
|
||||
}
|
||||
|
||||
//反馈上传cos桶结果,获取响应且reqType=3时有效
|
||||
val uploadCosResp = BagManagerOuterClass.UploadCosStat
|
||||
.newBuilder()
|
||||
|
||||
bagManagerEntity.uploadCosResp?.let {
|
||||
uploadCosResp.key = it.key
|
||||
uploadCosResp.stat = it.stat
|
||||
uploadCosResp.message = it.message
|
||||
bagManager.uploadCosResp = uploadCosResp.build()
|
||||
}
|
||||
|
||||
|
||||
return AdasManager.getInstance().sendBagManagerCmd(bagManager.build())
|
||||
}
|
||||
|
||||
/**
|
||||
* 向左变道
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.autopilot.adapter
|
||||
|
||||
import bag_manager.BagManagerOuterClass
|
||||
import chassis.VehicleStateOuterClass
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
@@ -48,6 +49,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListen
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordConfig
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordResult
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeBagManagerResult
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsListenerManager.invokeAutopilotStatistics
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerStartAutopilotFailedListenerManager.invokeStartAutopilotFailed
|
||||
@@ -56,7 +58,6 @@ import com.mogo.eagle.core.function.call.obucombine.CallerObuDcCombineListenerMa
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.OnAdasListener
|
||||
import com.zhidao.support.adas.high.bean.AutopilotAbility
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
@@ -454,11 +455,22 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否可以启动自动驾驶
|
||||
* 使用方法查看:app_ipc_monitoring/uiMainActivity/onAutopilotAbility
|
||||
* Bag管理应答
|
||||
*
|
||||
* @param header 头
|
||||
* @param bagManager 数据
|
||||
*/
|
||||
override fun onAutopilotAbility(ability: AutopilotAbility?) {
|
||||
invokeAutopilotAbility(ability)
|
||||
override fun onBagManagerCmd(header: MessagePad.Header?, bagManager: BagManagerOuterClass.BagManager?) {
|
||||
bagManager?.let {
|
||||
invokeBagManagerResult(it)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否可以启动自动驾驶
|
||||
*/
|
||||
override fun onAutopilotAbility(isAutopilotAbility: Boolean, unableAutopilotReason: String?) {
|
||||
invokeAutopilotAbility(isAutopilotAbility, unableAutopilotReason)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -94,7 +94,7 @@ public class BindingcarProvider implements IMoGoBindingcarProvider {
|
||||
|
||||
@Override
|
||||
public void modifyCarInfo(BindingcarCallBack callBack) {
|
||||
BindingcarNetWorkManager.getInstance().modifyBindingcar(mAddress, mWidevineIDWithMd5, callBack, getScreenType());
|
||||
BindingcarNetWorkManager.getInstance().modifyBindingcar(mContext, mAddress, mWidevineIDWithMd5, callBack, getScreenType());
|
||||
}
|
||||
|
||||
private void driverScreen(String macAddress, String widevineIDWithMd5) {
|
||||
|
||||
@@ -80,7 +80,9 @@ public class BindingcarNetWorkManager {
|
||||
if (info != null && info.getData() != null) {
|
||||
CallerLogger.INSTANCE.d(M_BINDING + TAG, "getBindingcarInfo onNext info.getData() =" + info.getData().toString());
|
||||
//根据车辆类型切换不同的车辆模型,只针对红旗做处理
|
||||
updateCarVrIconRes(info.getData().getBrandId());
|
||||
if (!SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.MAC_ADDRESS).equals(macAddress)) {
|
||||
updateCarVrIconRes(info.getData().getBrandId());
|
||||
}
|
||||
switch (info.getData().getCompare()) {
|
||||
case "0":
|
||||
CallerHmiManager.INSTANCE.showBindingcarDialog();
|
||||
@@ -93,6 +95,7 @@ public class BindingcarNetWorkManager {
|
||||
break;
|
||||
}
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.CAR_INFO, GsonUtils.toJson(info.getData()));
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.MAC_ADDRESS, macAddress);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +115,7 @@ public class BindingcarNetWorkManager {
|
||||
* 绑定和修改绑定车辆
|
||||
* mac: 48:b0:2d:3a:9c:19
|
||||
*/
|
||||
public void modifyBindingcar(String macAddress, String widevineIDWithMd5, BindingcarCallBack callBack, int screenType) {
|
||||
public void modifyBindingcar(Context context, String macAddress, String widevineIDWithMd5, BindingcarCallBack callBack, int screenType) {
|
||||
// String macAddress1 = "48:b0:2d:4d:33:40";
|
||||
// String sn = "X2020220417KA94QIN";
|
||||
BindingcarRequest request = new BindingcarRequest(macAddress, widevineIDWithMd5, screenType);
|
||||
@@ -130,7 +133,10 @@ public class BindingcarNetWorkManager {
|
||||
if (info != null) {
|
||||
callBack.callBackResult(info);
|
||||
CallerLogger.INSTANCE.d(M_BINDING + TAG, "modifyBindingcar onNext code = " + info.code + "---msg = " + info.msg + "--info.toString() = " + info.toString());
|
||||
updateCarVrIconRes(info.getData().getBrandId());
|
||||
if (!SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.MAC_ADDRESS).equals(macAddress)) {
|
||||
updateCarVrIconRes(info.getData().getBrandId());
|
||||
}
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.MAC_ADDRESS, macAddress);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -107,6 +107,10 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
BadCaseManager.showBadCaseConfigWindow(ctx)
|
||||
}
|
||||
|
||||
override fun showBadCaseManagerView(context: Context) {
|
||||
BadCaseManager.showBadCaseManagerWindow(context)
|
||||
}
|
||||
|
||||
override fun getUpgradeVersionUrls(versionName: String) {
|
||||
upgradeManager.getPackageUrls(versionName)
|
||||
}
|
||||
|
||||
@@ -6,40 +6,26 @@ import android.content.Context
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.lifecycle.*
|
||||
import androidx.lifecycle.Lifecycle.Event
|
||||
import androidx.lifecycle.Lifecycle.Event.ON_CREATE
|
||||
import androidx.lifecycle.Lifecycle.Event.ON_DESTROY
|
||||
import androidx.lifecycle.LifecycleCoroutineScope
|
||||
import androidx.lifecycle.LifecycleEventObserver
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.RecordBagMsg
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.PX
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifecycleOwner
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.reminder.Reminder
|
||||
import com.mogo.eagle.core.utilcode.reminder.api.IReminder
|
||||
import com.mogo.eagle.core.utilcode.reminder.api.IReminder.IGlobalStateChangeListener
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.biz.*
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.repository.db.entity.AutoPilotRecord
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.repository.net.api.entity.BadCaseResponse.Reason
|
||||
import com.zhjt.mogo_core_function_devatools.ext.enqueuePop
|
||||
import com.zhjt.mogo_core_function_devatools.ext.toast
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.channels.Channel
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import java.lang.ref.WeakReference
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
internal object BadCaseManager : LifecycleEventObserver {
|
||||
internal object BadCaseManager : LifecycleEventObserver{
|
||||
|
||||
const val TAG = "BadCase"
|
||||
|
||||
@@ -98,6 +84,22 @@ internal object BadCaseManager : LifecycleEventObserver {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示BadCase录包管理页面
|
||||
*/
|
||||
fun showBadCaseManagerWindow(context: Context){
|
||||
val badCaseManagerView = BadCaseManagerView(context)
|
||||
badCaseManagerView.setOnClickListener(object: BadCaseManagerView.ClickListener{
|
||||
override fun onClose() {
|
||||
hideFloat?.invoke()
|
||||
hideFloat = null
|
||||
}
|
||||
})
|
||||
context.enqueuePop(badCaseManagerView,AutoSizeUtils.dp2px(context,960f), WindowManager.LayoutParams.MATCH_PARENT, key = "BadCaseManagerView").also {
|
||||
hideFloat = it
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 主动采集BadCase
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,491 @@
|
||||
package com.zhjt.mogo_core_function_devatools.badcase.biz
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.os.Handler
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import bag_manager.BagManagerOuterClass
|
||||
import com.mogo.eagle.core.data.badcase.BagDescriptionEntity
|
||||
import com.mogo.eagle.core.data.badcase.BagInfoEntity
|
||||
import com.mogo.eagle.core.data.badcase.BagManagerEntity
|
||||
import com.mogo.eagle.core.data.badcase.SubBagEntity
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.zhidao.loglib.download.DownloadManager
|
||||
import com.zhjt.mogo_core_function_devatools.R
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.biz.adapter.BagManagerListAdapter
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig.bagManagerList
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.record.Audition
|
||||
import kotlinx.android.synthetic.main.layout_badcase_manager.view.*
|
||||
import java.util.*
|
||||
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description BadCase录包管理页面
|
||||
* @since: 2022/12/15
|
||||
*/
|
||||
class BadCaseManagerView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoAutopilotRecordListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "BadCaseManagerView"
|
||||
}
|
||||
|
||||
private var bagManagerListAdapter: BagManagerListAdapter ?= null
|
||||
private var bagManagerEntity: BagManagerEntity = BagManagerEntity()
|
||||
private var clickListener: ClickListener? = null
|
||||
private var bagUploadDialog: BagUploadDialog ?= null
|
||||
|
||||
private var spaceTotal: Long = 0 //总空间
|
||||
private var spaceUsed: Long = 0 //已用空间
|
||||
private var spaceFree: Long = 0 //可用空间
|
||||
|
||||
private var selectedBagNum = 0 //选中Bag包的数量
|
||||
private var selectedBagSize: Long = 0 //选中Bag包的大小
|
||||
|
||||
private val audioSavePath = "/mnt/sdcard/mogo/"
|
||||
|
||||
private var isNameModify = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_badcase_manager, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
background = ColorDrawable(Color.parseColor("#F0151D41"))
|
||||
clLayout.setOnClickListener {
|
||||
}
|
||||
//关闭BadCase管理窗口
|
||||
ivManagerClose.setOnClickListener {
|
||||
clickListener?.onClose()
|
||||
}
|
||||
//一键全选
|
||||
tvSelectAll.setOnClickListener {
|
||||
if(bagManagerEntity.bagsInfoResp.size>0){
|
||||
selectedBagSize = 0
|
||||
selectedBagNum = 0
|
||||
bagManagerList.clear()
|
||||
for(selectBagInfo in bagManagerEntity.bagsInfoResp){
|
||||
if(selectBagInfo.itemType == 0){
|
||||
selectBagInfo.selectStatus = true
|
||||
selectedBagSize += selectBagInfo.totalSize
|
||||
bagManagerList.add(selectBagInfo)
|
||||
selectedBagNum++
|
||||
}
|
||||
}
|
||||
//显示选择包的个数和大小
|
||||
tvSelectedBagSize.text = "已选${selectedBagNum}个包,共${selectedBagSize/(1000*1024*1024)}G"
|
||||
tvSelectedBagSize.visibility = View.VISIBLE
|
||||
bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
}
|
||||
}
|
||||
//取消选中
|
||||
tvCancelSelect.setOnClickListener {
|
||||
if(bagManagerEntity.bagsInfoResp.size>0){
|
||||
for(cancelBagInfo in bagManagerEntity.bagsInfoResp){
|
||||
cancelBagInfo.selectStatus = false
|
||||
bagManagerList.remove(cancelBagInfo)
|
||||
}
|
||||
selectedBagNum = 0
|
||||
selectedBagSize = 0
|
||||
tvSelectedBagSize.visibility = View.GONE
|
||||
bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//上传Cos桶
|
||||
tvUploadCloud.setOnClickListener {
|
||||
if(bagManagerList.size>0){
|
||||
bagManagerEntity.reqType = 3
|
||||
bagManagerEntity.keyReq = bagManagerList[0].key
|
||||
Log.i("sendBagManagerCmd","bagManagerEntity.keyReq="+bagManagerEntity.keyReq)
|
||||
CallerAutoPilotManager.sendBagManagerCmd(bagManagerEntity)
|
||||
|
||||
bagUploadDialog = BagUploadDialog(context)
|
||||
bagUploadDialog?.setListener { //删除选择,取消上传
|
||||
bagManagerList.clear()
|
||||
if (bagManagerEntity.bagsInfoResp.size > 0) {
|
||||
for (cancelBagInfo in bagManagerEntity.bagsInfoResp) {
|
||||
if(cancelBagInfo.itemType == 0){
|
||||
cancelBagInfo.selectStatus = false
|
||||
bagManagerList.remove(cancelBagInfo)
|
||||
}
|
||||
}
|
||||
selectedBagNum = 0
|
||||
selectedBagSize = 0
|
||||
tvSelectedBagSize.visibility = View.GONE
|
||||
bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
}
|
||||
}
|
||||
bagUploadDialog?.show()
|
||||
bagUploadDialog?.setAllUpload(selectedBagNum,selectedBagSize)
|
||||
}else{
|
||||
ToastUtils.showShort("请先选择要上传的Bag包")
|
||||
}
|
||||
|
||||
}
|
||||
//删除Bag包
|
||||
tvDeleteSelect.setOnClickListener {
|
||||
if(bagManagerList.size>0){
|
||||
bagManagerEntity.reqType = 4
|
||||
bagManagerEntity.keyReq = bagManagerList[0].key
|
||||
CallerAutoPilotManager.sendBagManagerCmd(bagManagerEntity)
|
||||
}else{
|
||||
ToastUtils.showShort("请先选择要删除的Bag包")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bagManagerListAdapter = BagManagerListAdapter()
|
||||
bagManagerListAdapter?.setListener(object :BagManagerListAdapter.BagClickListener{
|
||||
override fun onClick(bagInfoEntity: BagInfoEntity, isChecked: Boolean) {
|
||||
if(isChecked){
|
||||
bagInfoEntity.selectStatus = true
|
||||
bagManagerList.add(bagInfoEntity)
|
||||
selectedBagNum++
|
||||
selectedBagSize += bagInfoEntity.totalSize
|
||||
tvSelectedBagSize.text = "已选${selectedBagNum}个包,共${selectedBagSize/(1000*1024*1024)}G"
|
||||
tvSelectedBagSize.visibility = View.VISIBLE
|
||||
}else{
|
||||
bagInfoEntity.selectStatus = false
|
||||
bagManagerList.remove(bagInfoEntity)
|
||||
selectedBagNum--
|
||||
selectedBagSize -= bagInfoEntity.totalSize
|
||||
if(selectedBagNum == 0){
|
||||
tvSelectedBagSize.visibility = View.GONE
|
||||
}else{
|
||||
tvSelectedBagSize.text = "已选${selectedBagNum}个包,共${selectedBagSize/(1000*1024*1024)}G"
|
||||
tvSelectedBagSize.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun uploadBI(bagInfoEntity: BagInfoEntity) {
|
||||
//展示上报弹窗
|
||||
val initiativeBadCaseWindow = InitiativeBadCaseWindow(context as Activity)
|
||||
initiativeBadCaseWindow.setClickListener(object: InitiativeBadCaseWindow.ClickListener{
|
||||
override fun closeWindow() {
|
||||
initiativeBadCaseWindow.hideFloatWindow()
|
||||
}
|
||||
})
|
||||
initiativeBadCaseWindow.showReportBIWindow(bagInfoEntity)
|
||||
}
|
||||
|
||||
override fun editDescription(key: Long, description: BagDescriptionEntity) {
|
||||
//编辑Bag包描述信息
|
||||
isNameModify = true
|
||||
bagManagerEntity.reqType = 5
|
||||
bagManagerEntity.keyReq = key
|
||||
bagManagerEntity.descReq = description
|
||||
CallerAutoPilotManager.sendBagManagerCmd(bagManagerEntity)
|
||||
}
|
||||
|
||||
override fun bagAudio(key: Long, audioUrl: String) {
|
||||
DownloadManager.getInstance().init(context)
|
||||
val downUrl = audioUrl.replace("http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/","")
|
||||
DownloadManager.getInstance().download(downUrl,
|
||||
audioSavePath,"${key}.wav")
|
||||
//延迟播放
|
||||
Handler().postDelayed({
|
||||
//音频文件播放
|
||||
Audition.getInstance().playOrStop("${audioSavePath}${key}.wav")
|
||||
}, 1500)
|
||||
}
|
||||
|
||||
})
|
||||
val linearLayoutManager = LinearLayoutManager(context)
|
||||
rvBagList.layoutManager = linearLayoutManager
|
||||
rvBagList.adapter = bagManagerListAdapter
|
||||
|
||||
//音频文件播放
|
||||
// Audition.getInstance().playOrStop("/mnt/sdcard/mogo/test.wav")
|
||||
//
|
||||
// 音频下载
|
||||
// DownloadManager.getInstance().init(context)
|
||||
// DownloadManager.getInstance().download("CarPad/mogopadlog/X20202111230C01YYW/2023-01-30/Audio_1675049657187_BadCase.wav",
|
||||
// "/mnt/sdcard/mogo/","test13.wav")
|
||||
|
||||
}
|
||||
|
||||
fun setOnClickListener(clickListener: ClickListener) {
|
||||
this.clickListener = clickListener
|
||||
}
|
||||
|
||||
interface ClickListener {
|
||||
fun onClose()
|
||||
}
|
||||
|
||||
override fun onBagManagerResult(bagManager: BagManagerOuterClass.BagManager) {
|
||||
super.onBagManagerResult(bagManager)
|
||||
UiThreadHandler.post {
|
||||
Log.i(TAG,"onBagManagerResult Start")
|
||||
Log.i(TAG,"keyReq="+bagManager.keyReq)
|
||||
Log.i(TAG,"reqType="+bagManager.reqType)
|
||||
Log.i(TAG,"uploadCosResp stat="+bagManager.uploadCosResp.stat)
|
||||
Log.i(TAG,"descReq description="+bagManager.descReq.description
|
||||
+" audioUrl="+bagManager.descReq.audioUrl
|
||||
+" reportBI="+bagManager.descReq.reportBI
|
||||
+" hasAudio="+bagManager.descReq.hasAudio)
|
||||
for(logBag in bagManager.bagsInfoRespList){
|
||||
Log.i(TAG,"bagPath="+logBag.bagPath)
|
||||
Log.i(TAG,"timestamp="+logBag.timestamp)
|
||||
Log.i(TAG,"description="+logBag.description)
|
||||
Log.i(TAG,"key="+logBag.key)
|
||||
Log.i(TAG,"mergeStat="+logBag.mergeStat)
|
||||
Log.i(TAG,"totalSize="+logBag.totalSize)
|
||||
Log.i(TAG,"uploadStat="+logBag.uploadStat)
|
||||
}
|
||||
Log.i(TAG,"onBagManagerResult End")
|
||||
|
||||
//获取空间使用信息
|
||||
if(bagManager.reqType == 1){
|
||||
//遍历各个主机的硬盘空间信息
|
||||
if(bagManager.spaceInfoRespCount>0){
|
||||
spaceTotal = 0
|
||||
spaceUsed = 0
|
||||
spaceFree = 0
|
||||
for(spaceInfo in bagManager.spaceInfoRespList){
|
||||
spaceInfo.diskSpaceInfo?.let {
|
||||
spaceTotal += it.total
|
||||
spaceUsed += it.used
|
||||
spaceFree += it.free
|
||||
}
|
||||
}
|
||||
//展示空间使用情况
|
||||
//已使用空间
|
||||
tvUsedSpaceContent.text = "${(spaceUsed/(1000*1024*1024L))}G"
|
||||
//可使用空间
|
||||
tvFreeSpaceContent.text = "${(spaceFree/(1000*1024*1024L))}G"
|
||||
//进度条展示空间
|
||||
pbSpacePercent.progress = (spaceUsed*100/spaceTotal).toInt()
|
||||
}
|
||||
}
|
||||
//遍历所有bag
|
||||
else if(bagManager.reqType == 2){
|
||||
clBagHaveDataLayout.visibility = View.VISIBLE
|
||||
clBagNoDataLayout.visibility = View.GONE
|
||||
if(bagManager.bagsInfoRespCount>0){
|
||||
bagManagerEntity.bagsInfoResp.clear()
|
||||
val originBagInfoList = ArrayList<BagInfoEntity>()
|
||||
for(bagInfo in bagManager.bagsInfoRespList){
|
||||
bagInfo?.let {
|
||||
val descriptionEntity = BagDescriptionEntity(it.description.description,it.description.hasAudio,it.description.audioUrl,it.description.reportBI)
|
||||
val bagInfoEntity = BagInfoEntity()
|
||||
bagInfoEntity.key = it.key
|
||||
bagInfoEntity.totalSize = it.totalSize
|
||||
bagInfoEntity.timestamp = it.timestamp
|
||||
bagInfoEntity.bagPath = it.bagPath
|
||||
bagInfoEntity.mergeStat = it.mergeStat
|
||||
bagInfoEntity.uploadStat = it.uploadStat
|
||||
bagInfoEntity.itemType = 0
|
||||
bagInfoEntity.description = descriptionEntity
|
||||
for(subBag in it.subBagsList){
|
||||
val subBagEntity = SubBagEntity(subBag.key,subBag.host,subBag.size)
|
||||
bagInfoEntity.subBags.add(subBagEntity)
|
||||
}
|
||||
originBagInfoList.add(bagInfoEntity)
|
||||
//对数组按照时间顺序进行倒序排序
|
||||
originBagInfoList.sortWith(Comparator { o1, o2 ->
|
||||
o2.timestamp.compareTo(o1.timestamp)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
for(originBagInfo in originBagInfoList){
|
||||
originBagInfo.let {
|
||||
it.timestamp.let { time ->
|
||||
val month = time.substring(4,6)
|
||||
val day = time.substring(6,8)
|
||||
val timeStr = "${month}月${day}日"
|
||||
var containTime = false
|
||||
for(bag in bagManagerEntity.bagsInfoResp){
|
||||
if(bag.timeStr == timeStr){
|
||||
containTime = true
|
||||
}
|
||||
}
|
||||
if(!containTime || bagManagerEntity.bagsInfoResp.size ==0){
|
||||
//增加时间的
|
||||
val bagInfoTimeEntity = BagInfoEntity()
|
||||
bagInfoTimeEntity.itemType = 1
|
||||
bagInfoTimeEntity.timeStr = timeStr
|
||||
bagInfoTimeEntity.timestamp = time.substring(0,8)
|
||||
bagManagerEntity.bagsInfoResp.add(bagInfoTimeEntity)
|
||||
}
|
||||
var containKey = false
|
||||
for(bagInfoContain in bagManagerEntity.bagsInfoResp){
|
||||
if(bagInfoContain.key == it.key){
|
||||
containKey = true
|
||||
}
|
||||
}
|
||||
if(!containKey){
|
||||
bagManagerEntity.bagsInfoResp.add(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//更新List
|
||||
bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
}
|
||||
|
||||
// 开启定时查询速度
|
||||
Timer().schedule(timerTaskRefresh, Date(), 60*1000)
|
||||
}
|
||||
//上传Cos
|
||||
else if(bagManager.reqType == 3){
|
||||
//此处应循环上传Cos
|
||||
val uploadIterator = bagManagerEntity.bagsInfoResp.iterator()
|
||||
while(uploadIterator.hasNext()){
|
||||
val uploadBagInfo = uploadIterator.next()
|
||||
if(uploadBagInfo.key == bagManager.uploadCosResp.key && bagManager.uploadCosResp.stat!=1){
|
||||
bagManagerList.remove(uploadBagInfo)
|
||||
if(bagManagerList.size>0){
|
||||
var remainSize = 0L
|
||||
for(bagInfo in bagManagerList){
|
||||
remainSize += bagInfo.totalSize
|
||||
}
|
||||
bagUploadDialog?.updateRemainUpload(bagManagerList.size,remainSize)
|
||||
//执行下一个上传Bag命令
|
||||
bagManagerEntity.reqType = 3
|
||||
bagManagerEntity.keyReq = bagManagerList[0].key
|
||||
Log.i("sendBagManagerCmd","bagManagerEntity.keyReq="+bagManagerEntity.keyReq)
|
||||
CallerAutoPilotManager.sendBagManagerCmd(bagManagerEntity)
|
||||
}
|
||||
}
|
||||
}
|
||||
//上传Cos执行完成
|
||||
if(bagManagerList.size == 0 && selectedBagNum != 0){
|
||||
ToastUtils.showShort("上传命令完成")
|
||||
bagUploadDialog?.uploadCompleted()
|
||||
tvCancelSelect.performClick()
|
||||
}
|
||||
|
||||
when (bagManager.uploadCosResp.stat) {
|
||||
0 -> {
|
||||
ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶成功")
|
||||
}
|
||||
2 -> {
|
||||
ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶copy过程失败,原因:${bagManager.uploadCosResp.message}")
|
||||
}
|
||||
3 -> {
|
||||
ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶合并过程失败,原因:${bagManager.uploadCosResp.message}")
|
||||
}
|
||||
4 -> {
|
||||
ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶上传过程失败,原因:${bagManager.uploadCosResp.message}")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//删除Bag
|
||||
else if(bagManager.reqType == 4){
|
||||
//收到此回调就删除对应key的Bag
|
||||
val iterator = bagManagerEntity.bagsInfoResp.iterator()
|
||||
while(iterator.hasNext()){
|
||||
val deleteBagInfo = iterator.next()
|
||||
if(deleteBagInfo.key == bagManager.keyReq){
|
||||
iterator.remove()
|
||||
bagManagerList.remove(deleteBagInfo)
|
||||
//更新列表
|
||||
// bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
if(bagManagerList.size>0){
|
||||
//继续执行删除命令
|
||||
bagManagerEntity.reqType = 4
|
||||
bagManagerEntity.keyReq = bagManagerList[0].key
|
||||
CallerAutoPilotManager.sendBagManagerCmd(bagManagerEntity)
|
||||
}
|
||||
}
|
||||
}
|
||||
//遍历列表,如当天Bag全部删除,同时把日期标题也删除更新列表
|
||||
val titleIterator = bagManagerEntity.bagsInfoResp.iterator()
|
||||
while(titleIterator.hasNext()){
|
||||
val titleBagInfo = titleIterator.next()
|
||||
if(titleBagInfo.itemType == 1){
|
||||
val bagIterator = bagManagerEntity.bagsInfoResp.iterator()
|
||||
var hasBag = false
|
||||
while(bagIterator.hasNext()){
|
||||
val bagBagInfo = bagIterator.next()
|
||||
if(bagBagInfo.itemType == 0){
|
||||
bagBagInfo.timestamp?.let {
|
||||
if(it.contains(titleBagInfo.timestamp.toString())){
|
||||
hasBag = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!hasBag){
|
||||
bagIterator.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
//更新列表
|
||||
bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
}
|
||||
//修改bag附加信息
|
||||
else if(bagManager.reqType == 5){
|
||||
//更新Bag包上报状态
|
||||
for(bagInfo in bagManagerEntity.bagsInfoResp){
|
||||
if(bagInfo.key == bagManager.keyReq){
|
||||
bagInfo.description?.let {
|
||||
it.reportBI = bagManager.descReq.reportBI
|
||||
it.description = bagManager.descReq.description
|
||||
it.hasAudio = bagManager.descReq.hasAudio
|
||||
it.audioUrl = bagManager.descReq.audioUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!isNameModify){
|
||||
//更新List
|
||||
bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
}
|
||||
isNameModify = false
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerAutopilotRecordListenerManager.addListener(TAG, this)
|
||||
bagManagerEntity.reqType = 2
|
||||
//遍历所有bag
|
||||
CallerAutoPilotManager.sendBagManagerCmd(bagManagerEntity)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerAutopilotRecordListenerManager.removeListener(TAG)
|
||||
try {
|
||||
timerTaskRefresh.cancel()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
private val timerTaskRefresh = object : TimerTask() {
|
||||
override fun run() {
|
||||
UiThreadHandler.post {
|
||||
//获取空间使用信息,每隔1分钟获取一次
|
||||
bagManagerEntity.reqType = 1
|
||||
CallerAutoPilotManager.sendBagManagerCmd(bagManagerEntity)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.zhjt.mogo_core_function_devatools.badcase.biz;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.zhjt.mogo_core_function_devatools.R;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description Bag包上传进度展示弹窗
|
||||
* @since: 2022/2/1
|
||||
*/
|
||||
public class BagUploadDialog extends Dialog {
|
||||
|
||||
private TextView tvCancelUpload;//取消上传
|
||||
private TextView tvCancel;//取消
|
||||
private TextView tvUploadDetail;//上传详情
|
||||
private ProgressBar viewUploadProgress;//上传进度条
|
||||
|
||||
private int totalNum = 0;
|
||||
private Long totalSize = 0L;
|
||||
private int remainNum = 0;
|
||||
private Long remainSize = 0L;
|
||||
|
||||
private BagUploadListener uploadListener;
|
||||
private DecimalFormat format = new DecimalFormat("0.0");
|
||||
|
||||
public BagUploadDialog(@NonNull Context context) {
|
||||
super(context, R.style.bad_case_dialog);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.dialog_bag_upload);
|
||||
WindowManager.LayoutParams params = getWindow().getAttributes();
|
||||
params.height = 688;
|
||||
params.width = 1110;
|
||||
getWindow().setAttributes(params);//向WindowManager设置属性
|
||||
setCanceledOnTouchOutside(false);
|
||||
init();
|
||||
initEvent();
|
||||
}
|
||||
|
||||
private void init(){
|
||||
tvCancelUpload = findViewById(R.id.tvCancelUpload);
|
||||
tvCancel = findViewById(R.id.tvCancel);
|
||||
tvUploadDetail = findViewById(R.id.tvUploadDetail);
|
||||
viewUploadProgress = findViewById(R.id.viewUploadProgress);
|
||||
}
|
||||
|
||||
private void initEvent(){
|
||||
//取消上传
|
||||
tvCancelUpload.setOnClickListener(v -> {
|
||||
if(uploadListener!=null){
|
||||
uploadListener.cancelUpload();
|
||||
}
|
||||
dismiss();
|
||||
});
|
||||
//取消
|
||||
tvCancel.setOnClickListener(v -> {
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
}
|
||||
|
||||
public void setListener(BagUploadListener listener){
|
||||
uploadListener = listener;
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
public void setAllUpload(int totalNum, Long totalSize){
|
||||
this.totalNum = totalNum;
|
||||
this.totalSize = totalSize;
|
||||
//更新进度条和进度文字
|
||||
String totalStr = format.format((totalSize/(1000*1024*1024.0)));
|
||||
tvUploadDetail.setText("共计"+totalNum+"个包 ("+totalStr+"G) 已上传"+(0)+"个包 ("
|
||||
+0+"G) 剩余"+totalNum+"个包 ("+ totalStr+"G)");
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
public void updateRemainUpload(int remainNum, Long remainSize){
|
||||
this.remainNum = remainNum;
|
||||
this.remainSize = remainSize;
|
||||
//更新进度条和进度文字
|
||||
String updateTotalStr = format.format((totalSize/(1000*1024*1024.0)));
|
||||
String updateUploadStr = format.format(((totalSize-remainSize)/(1000*1024*1024.0)));
|
||||
String updateRemainStr = format.format((remainSize/(1000*1024*1024.0)));
|
||||
tvUploadDetail.setText("共计"+totalNum+"个包 ("+updateTotalStr+"G) 已上传"+(totalNum-remainNum)+"个包 ("
|
||||
+updateUploadStr+"G) 剩余"+remainNum+"个包 ("+ updateRemainStr +"G)");
|
||||
viewUploadProgress.setProgress((totalNum-remainNum)*100/totalNum);
|
||||
}
|
||||
|
||||
public void uploadCompleted(){
|
||||
dismiss();
|
||||
}
|
||||
|
||||
interface BagUploadListener{
|
||||
//取消上传
|
||||
void cancelUpload();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
|
||||
@@ -116,4 +117,8 @@ public class CaseListDialog extends Dialog implements IMoGoAutopilotRecordListen
|
||||
caseListAdapter.notifyDataSetChanged();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBagManagerResult(@NonNull BagManagerOuterClass.BagManager bagManager) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
|
||||
@@ -203,4 +204,8 @@ public class CaseTopicListDialog extends Dialog implements IMoGoAutopilotRecordL
|
||||
@Override
|
||||
public void onAutopilotRecordResult(@NonNull RecordPanelOuterClass.RecordPanel recordPanel) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBagManagerResult(@NonNull BagManagerOuterClass.BagManager bagManager) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,9 @@ import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.badcase.BagDescriptionEntity
|
||||
import com.mogo.eagle.core.data.badcase.BagInfoEntity
|
||||
import com.mogo.eagle.core.data.badcase.BagManagerEntity
|
||||
import com.mogo.eagle.core.data.badcase.RecordCaseEntity
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarStateListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
@@ -89,6 +92,8 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
private var longitude: Double?=null
|
||||
private var latitude: Double?=null
|
||||
|
||||
private var bagManagerEntity: BagManagerEntity = BagManagerEntity()
|
||||
|
||||
private var mInViewX = 0f
|
||||
private var mInViewY = 0f
|
||||
private var mDownInScreenX = 0f
|
||||
@@ -150,6 +155,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
TipToast.shortTip("请选择至少一个Case")
|
||||
return@setOnClickListener
|
||||
}
|
||||
uploadReason.clear()
|
||||
if(rbOne.isChecked){
|
||||
uploadReason.append("严重画龙 ")
|
||||
}
|
||||
@@ -285,7 +291,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
itx["filename"] = recordFileName?:"" //bag包文件地址
|
||||
itx["filesize"] = "0" //bag包文件大小
|
||||
itx["key"] = recordKey?:"" //key
|
||||
itx["reason"] = uploadReason.toString()?:"" //采集原因
|
||||
itx["reason"] = uploadReason.toString() //采集原因
|
||||
itx["duration"] = BadCaseConfig.totalDuration.toString() //采集时长,固定为20S
|
||||
itx["startTime"] = System.currentTimeMillis().toString() //上报时间(时间戳格式)
|
||||
itx["channel"] = "1" //渠道
|
||||
@@ -301,6 +307,15 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
TipToast.shortTip("上报失败")
|
||||
} else {
|
||||
TipToast.shortTip("上报成功")
|
||||
//将上报BI的结果同步给工控机记录保存
|
||||
recordKey?.let {
|
||||
val hasAudio = downloadUrl != null
|
||||
val descReqEntity = BagDescriptionEntity(uploadReason.toString(),hasAudio,downloadUrl.toString(),true)
|
||||
bagManagerEntity.reqType = 5
|
||||
bagManagerEntity.keyReq = it.toLong()
|
||||
bagManagerEntity.descReq = descReqEntity
|
||||
CallerAutoPilotManager.sendBagManagerCmd(bagManagerEntity)
|
||||
}
|
||||
BadCaseConfig.windowNum--
|
||||
clickListener?.closeWindow()
|
||||
}
|
||||
@@ -351,6 +366,22 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
}
|
||||
}
|
||||
|
||||
fun showReportBIWindow(bagInfoEntity: BagInfoEntity){
|
||||
if (mFloatLayout.parent == null) {
|
||||
val metrics = DisplayMetrics()
|
||||
// 默认固定位置,靠屏幕右边缘的中间
|
||||
mWindowManager!!.defaultDisplay.getMetrics(metrics)
|
||||
mWindowParams!!.x = metrics.widthPixels
|
||||
mWindowParams!!.y = metrics.heightPixels - BarUtils.getStatusBarHeight()-950
|
||||
mWindowManager!!.addView(mFloatLayout, mWindowParams)
|
||||
//已经录包无需再次启动录包,只要将录包信息同步到弹窗
|
||||
bagInfoEntity.let {
|
||||
recordKey = it.key.toString()
|
||||
recordFileName = it.bagPath
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun hideFloatWindow() {
|
||||
//注销采集结果回调监听
|
||||
CallerAutopilotRecordListenerManager.removeListener(this.hashCode().toString())
|
||||
|
||||
@@ -16,10 +16,13 @@ import android.widget.TextView
|
||||
import com.google.android.flexbox.FlexboxLayout
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.badcase.BagDescriptionEntity
|
||||
import com.mogo.eagle.core.data.badcase.BagManagerEntity
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.data.msgbox.RecordBagMsg
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarStateListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -61,6 +64,8 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
private var audioStatus = false
|
||||
private var audioFileName:String?=null //录音文件名称
|
||||
|
||||
private var bagManagerEntity: BagManagerEntity = BagManagerEntity()
|
||||
|
||||
private var uploadReason: String = String() //上报原因,标签
|
||||
private var recordKey: String?=null //录制bag包key
|
||||
private var recordFileName: String?=null //录制文件包名
|
||||
@@ -265,6 +270,15 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
TipToast.shortTip("上报失败")
|
||||
} else {
|
||||
TipToast.shortTip("上报成功")
|
||||
//将上报BI的结果同步给工控机记录保存
|
||||
recordKey?.let {
|
||||
val hasAudio = downloadUrl != null
|
||||
val descReqEntity = BagDescriptionEntity(uploadReason,hasAudio,downloadUrl.toString(),true)
|
||||
bagManagerEntity.reqType = 5
|
||||
bagManagerEntity.keyReq = it.toLong()
|
||||
bagManagerEntity.descReq = descReqEntity
|
||||
CallerAutoPilotManager.sendBagManagerCmd(bagManagerEntity)
|
||||
}
|
||||
BadCaseConfig.windowNum--
|
||||
clickListener?.closeWindow()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.zhjt.mogo_core_function_devatools.badcase.biz;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
|
||||
import com.zhjt.mogo_core_function_devatools.R;
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description BadCase车端磁盘空间已满预警弹窗
|
||||
* @since: 2022/2/1
|
||||
*/
|
||||
public class SpaceWarningDialog extends Dialog {
|
||||
|
||||
private TextView tvCleanDisk;//清理磁盘
|
||||
private TextView tvCancel;//取消
|
||||
private Activity mActivity;
|
||||
|
||||
private ClickListener clickListener;
|
||||
|
||||
public SpaceWarningDialog(@NonNull Activity activity) {
|
||||
super(activity, R.style.bad_case_dialog);
|
||||
mActivity = activity;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.dialog_space_warning);
|
||||
WindowManager.LayoutParams params = getWindow().getAttributes();
|
||||
params.height = 688;
|
||||
params.width = 1110;
|
||||
getWindow().setAttributes(params);//向WindowManager设置属性
|
||||
setCanceledOnTouchOutside(false);
|
||||
init();
|
||||
initEvent();
|
||||
}
|
||||
|
||||
private void init(){
|
||||
tvCleanDisk = findViewById(R.id.tvCleanDisk);
|
||||
tvCancel = findViewById(R.id.tvCancel);
|
||||
}
|
||||
|
||||
private void initEvent(){
|
||||
//清理磁盘
|
||||
tvCleanDisk.setOnClickListener(v -> {
|
||||
//跳转录包管理页面
|
||||
// if(mActivity!=null){
|
||||
// CallerDevaToolsManager.INSTANCE.showBadCaseManagerView(mActivity);
|
||||
// }
|
||||
if(clickListener!=null){
|
||||
clickListener.showBadCaseManagerView();
|
||||
}
|
||||
dismiss();
|
||||
});
|
||||
//取消
|
||||
tvCancel.setOnClickListener(v -> {
|
||||
//取消弹窗
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
public void setClickListener(ClickListener clickListener){
|
||||
this.clickListener = clickListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
}
|
||||
|
||||
public interface ClickListener{
|
||||
void showBadCaseManagerView();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
package com.zhjt.mogo_core_function_devatools.badcase.biz.adapter
|
||||
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.CheckBox
|
||||
import android.widget.EditText
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.badcase.BagDescriptionEntity
|
||||
import com.mogo.eagle.core.data.badcase.BagInfoEntity
|
||||
import com.zhjt.mogo_core_function_devatools.R
|
||||
import java.text.DecimalFormat
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description Bag包管理列表适配器
|
||||
* @since: 2022/12/19
|
||||
*/
|
||||
class BagManagerListAdapter: RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
|
||||
private var data:List<BagInfoEntity> ?= null
|
||||
private var bagClickListener: BagClickListener ?= null
|
||||
private val format = DecimalFormat("0.00")
|
||||
|
||||
fun setData(data: List<BagInfoEntity>?){
|
||||
this.data = data
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
if(viewType == 1){
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_bag_time_title,parent,false)
|
||||
return BagTimeTitleHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_bag_manager, parent, false)
|
||||
return BagManagerListHolder(view)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
when(holder){
|
||||
is BagTimeTitleHolder ->{
|
||||
data?.let {
|
||||
holder.tvBagTimeTitle.text = it[position].timeStr
|
||||
}
|
||||
}
|
||||
is BagManagerListHolder->{
|
||||
data?.let {
|
||||
val bagInfoEntity = it[position]
|
||||
holder.cbBagSelect.setOnCheckedChangeListener(null)
|
||||
holder.cbBagSelect.isChecked = bagInfoEntity.selectStatus
|
||||
holder.cbBagSelect.tag = bagInfoEntity
|
||||
holder.cbBagSelect.setOnCheckedChangeListener { _, isChecked ->
|
||||
bagClickListener?.onClick(bagInfoEntity,isChecked)
|
||||
}
|
||||
|
||||
val textWatcher: TextWatcher = object : TextWatcher {
|
||||
override fun beforeTextChanged(
|
||||
charSequence: CharSequence,
|
||||
i: Int,
|
||||
i1: Int,
|
||||
i2: Int
|
||||
) {
|
||||
}
|
||||
|
||||
override fun onTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {}
|
||||
override fun afterTextChanged(editable: Editable) {
|
||||
bagInfoEntity.description?.let { desc->
|
||||
val descriptionStr = editable.toString()
|
||||
if(desc.description != descriptionStr){
|
||||
desc.description = descriptionStr
|
||||
bagClickListener?.editDescription(bagInfoEntity.key,desc)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
holder.etBagNameEdit.onFocusChangeListener =
|
||||
View.OnFocusChangeListener { p0, hasFocus ->
|
||||
val edit = p0 as EditText
|
||||
if(hasFocus){
|
||||
edit.addTextChangedListener(textWatcher)
|
||||
}else{
|
||||
edit.removeTextChangedListener(textWatcher)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bagInfoEntity.description?.let { des->
|
||||
if(des.reportBI){
|
||||
//已上报
|
||||
holder.tvBagReportStatus.text = "已上报"
|
||||
holder.tvBagReportStatus.setBackgroundResource(R.drawable.bag_reported_button_bg)
|
||||
}else{
|
||||
//未上报
|
||||
holder.tvBagReportStatus.text = "上报"
|
||||
holder.tvBagReportStatus.setBackgroundResource(R.drawable.bag_report_button_bg)
|
||||
holder.tvBagReportStatus.setOnClickListener {
|
||||
bagClickListener?.uploadBI(bagInfoEntity)
|
||||
}
|
||||
}
|
||||
if(des.description.isEmpty()){
|
||||
holder.etBagNameEdit.setText(bagInfoEntity.key.toString())
|
||||
}else{
|
||||
holder.etBagNameEdit.setText(des.description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(bagInfoEntity.description?.hasAudio == true){
|
||||
holder.ivBagAudio.visibility = View.VISIBLE
|
||||
holder.ivBagAudio.setOnClickListener {
|
||||
bagInfoEntity.description?.let { description->
|
||||
bagClickListener?.bagAudio(bagInfoEntity.key,description.audioUrl)
|
||||
}
|
||||
}
|
||||
}else{
|
||||
holder.ivBagAudio.visibility = View.INVISIBLE
|
||||
}
|
||||
//大小
|
||||
val bagSize = format.format(bagInfoEntity.totalSize/(1000*1024*1024.0))
|
||||
holder.tvBagSize.text = "${bagSize}G"
|
||||
|
||||
//时间
|
||||
bagInfoEntity.timestamp?.let { time->
|
||||
val hour = time.substring(8,10)
|
||||
val min = time.substring(10,12)
|
||||
val second = time.substring(12,14)
|
||||
holder.tvBagTime.text = "${hour}:${min}:${second}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
return data!![position].itemType
|
||||
}
|
||||
|
||||
class BagTimeTitleHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvBagTimeTitle: TextView = itemView.findViewById(R.id.tvBagTimeTitle)
|
||||
}
|
||||
|
||||
class BagManagerListHolder(itemView: View) : RecyclerView.ViewHolder(itemView){
|
||||
var cbBagSelect: CheckBox = itemView.findViewById(R.id.cbBagSelect)
|
||||
var etBagNameEdit: EditText = itemView.findViewById(R.id.etBagNameEdit)
|
||||
var tvBagReportStatus: TextView = itemView.findViewById(R.id.tvBagReportStatus)
|
||||
var ivBagAudio: ImageView = itemView.findViewById(R.id.ivBagAudio)
|
||||
var tvBagTime: TextView = itemView.findViewById(R.id.tvBagTime)
|
||||
var tvBagSize: TextView = itemView.findViewById(R.id.tvBagSize)
|
||||
}
|
||||
|
||||
fun setListener(listener: BagClickListener){
|
||||
bagClickListener = listener
|
||||
}
|
||||
|
||||
interface BagClickListener{
|
||||
//选择Bag包
|
||||
fun onClick(bagInfoEntity: BagInfoEntity,isChecked: Boolean)
|
||||
//上报BI平台
|
||||
fun uploadBI(bagInfoEntity: BagInfoEntity)
|
||||
//编辑Bag包描述信息
|
||||
fun editDescription(key: Long,description: BagDescriptionEntity)
|
||||
//听录音
|
||||
fun bagAudio(key: Long,audioUrl: String)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.zhjt.mogo_core_function_devatools.badcase.consts
|
||||
|
||||
import com.mogo.eagle.core.data.badcase.BagInfoEntity
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 录包配置参数
|
||||
@@ -32,5 +34,8 @@ object BadCaseConfig {
|
||||
//自定义Topic清单列表
|
||||
@JvmField
|
||||
var customTopicList: ArrayList<String> = ArrayList()
|
||||
//Bag包管理列表
|
||||
@JvmField
|
||||
var bagManagerList: ArrayList<BagInfoEntity> = ArrayList()
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.zhjt.mogo_core_function_devatools.badcase.record;
|
||||
|
||||
import android.media.AudioManager;
|
||||
import android.media.MediaPlayer;
|
||||
import android.text.TextUtils;
|
||||
|
||||
//播放试听
|
||||
public class Audition implements MediaPlayer.OnPreparedListener, MediaPlayer.OnCompletionListener{
|
||||
private static volatile Audition INSTANCE;
|
||||
public MediaPlayer mediaPlayer;
|
||||
private String oldPath;
|
||||
private OnAuditionListener listener;
|
||||
|
||||
public interface OnAuditionListener {
|
||||
void onAuditionCompletion();
|
||||
|
||||
}
|
||||
|
||||
public void registerOnAuditionListener(OnAuditionListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
public void unregisterOnAuditionListener() {
|
||||
this.listener = null;
|
||||
}
|
||||
|
||||
private Audition() {
|
||||
}
|
||||
|
||||
public static Audition getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
synchronized (Audition.class) {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = new Audition();
|
||||
}
|
||||
}
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
|
||||
public boolean isPlaying() {
|
||||
return mediaPlayer != null && mediaPlayer.isPlaying();
|
||||
}
|
||||
|
||||
private void play(String path) {
|
||||
oldPath = path;
|
||||
if (mediaPlayer != null) {
|
||||
mediaPlayer.release();
|
||||
mediaPlayer = null;
|
||||
}
|
||||
if (mediaPlayer == null) {
|
||||
mediaPlayer = new MediaPlayer();
|
||||
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
|
||||
mediaPlayer.setOnPreparedListener(this);
|
||||
mediaPlayer.setOnCompletionListener(this);
|
||||
}
|
||||
try {
|
||||
mediaPlayer.setDataSource(path);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mediaPlayer.prepareAsync();
|
||||
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
oldPath = null;
|
||||
if (mediaPlayer != null) {
|
||||
mediaPlayer.stop();
|
||||
mediaPlayer.reset();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean playOrStop(String path) {
|
||||
if (!TextUtils.equals(oldPath, path)) {
|
||||
play(path);
|
||||
return true;
|
||||
} else {
|
||||
stop();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void onDestroy() {
|
||||
stop();
|
||||
mediaPlayer = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPrepared(MediaPlayer mp) {
|
||||
mp.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCompletion(MediaPlayer mp) {
|
||||
oldPath = null;
|
||||
if (listener != null) {
|
||||
listener.onAuditionCompletion();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.getMisChannelCode
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
@@ -38,6 +39,7 @@ object SyncConfig {
|
||||
AppConfigInfo.mapSdkOptVersion = DebugConfig.getMapOptVersion()
|
||||
AppConfigInfo.isConnectNet = NetworkUtils.isConnected(context)
|
||||
AppConfigInfo.isConnectSocket = MogoStatusManager.getInstance().isSocketOnLine
|
||||
AppConfigInfo.role = AppIdentityModeUtils.getMisChannelCode(FunctionBuildConfig.appIdentityMode)
|
||||
when {
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) -> {// 司机端
|
||||
AppConfigInfo.isDriver = true
|
||||
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#BB791C"
|
||||
android:endColor="#BB791C"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:radius="13px" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#566195"
|
||||
android:endColor="#566195"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:radius="13px" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#3B4577"
|
||||
android:endColor="#3B4577"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:radius="13px" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#3B4577"
|
||||
android:endColor="#3B4577"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:radius="16px" />
|
||||
</shape>
|
||||
|
After Width: | Height: | Size: 926 B |
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<!-- solid指定形状的填充色,只有android:color一个属性 -->
|
||||
<gradient
|
||||
android:startColor="#3B4577"
|
||||
android:endColor="#7CF6FF"
|
||||
/>
|
||||
<!-- padding设置内容区域离边界的间距 -->
|
||||
<!-- corners设置圆角,只适用于rectangle -->
|
||||
<!-- <corners android:bottomRightRadius="20dp"-->
|
||||
<!-- android:topRightRadius="20dp"/>-->
|
||||
|
||||
<corners android:radius="30px"
|
||||
/>
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<corners
|
||||
android:radius="30px"
|
||||
/>
|
||||
<solid android:color="#3B4577"/>
|
||||
|
||||
<stroke
|
||||
android:color="#7CF6FF"
|
||||
android:width="1.5px"
|
||||
/>
|
||||
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/secondaryProgress">
|
||||
<scale android:scaleWidth="100%">
|
||||
<shape>
|
||||
<corners android:topRightRadius="30px"
|
||||
android:bottomRightRadius="30px"/>
|
||||
<solid android:color="#7CF6FF"/>
|
||||
</shape>
|
||||
</scale>
|
||||
</item>
|
||||
|
||||
<item android:id="@android:id/progress">
|
||||
<scale android:scaleWidth="100%"
|
||||
android:drawable="@drawable/progress_bar_ct" />
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#029DFF"
|
||||
android:endColor="#0056FF"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:radius="13px" />
|
||||
</shape>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 设置背景色 -->
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<corners android:radius="0dp" />
|
||||
<gradient
|
||||
android:startColor="#33A682"
|
||||
android:endColor="#4ADD80"
|
||||
/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- 设置进度条颜色 -->
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape>
|
||||
<corners android:radius="0dp" />
|
||||
<gradient
|
||||
android:startColor="#FFD900"
|
||||
android:endColor="#FFAB00"
|
||||
/>
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 设置背景色 -->
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<corners android:radius="21px" />
|
||||
|
||||
<gradient
|
||||
android:startColor="#3B4577"
|
||||
android:endColor="#D71B0E"
|
||||
/>
|
||||
<stroke
|
||||
android:color="#FF807C"
|
||||
android:width="1.5px"
|
||||
/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- 设置进度条颜色 -->
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape>
|
||||
<corners
|
||||
android:bottomLeftRadius="21px"
|
||||
android:bottomRightRadius="21px"
|
||||
android:topLeftRadius="21px"
|
||||
android:topRightRadius="21px"
|
||||
/>
|
||||
<gradient
|
||||
android:startColor="#06D1ED"
|
||||
android:endColor="#06D1ED"
|
||||
android:type="radial"
|
||||
/>
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:startColor="#33A682"
|
||||
android:endColor="#4ADD80"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#029DFF"
|
||||
android:endColor="#0056FF"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:radius="16px" />
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:startColor="#FFD900"
|
||||
android:endColor="#FFAB00"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="1110px"
|
||||
android:layout_height="688px">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUploadTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:text="cos桶上传中"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="56px"
|
||||
android:layout_marginTop="95px"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewVerticalLine"
|
||||
android:layout_width="2px"
|
||||
android:layout_height="160px"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewHorizontalLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2px"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/viewVerticalLine"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancelUpload"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewHorizontalLine"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="@id/viewVerticalLine"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:text="取消上传"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="52px"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewHorizontalLine"
|
||||
app:layout_constraintLeft_toRightOf="@id/viewVerticalLine"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:text="取消"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="52px"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/viewUploadProgress"
|
||||
android:layout_width="791px"
|
||||
android:layout_height="42px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="270px"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/progress_bar_drawable"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUploadDetail"
|
||||
android:layout_width="814px"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="370px"
|
||||
android:textColor="#FF06D1ED"
|
||||
android:textSize="43px"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="1110px"
|
||||
android:layout_height="688px">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvWarningTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="当前工控机磁盘空间已满"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="56px"
|
||||
android:layout_marginTop="95px"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewVerticalLine"
|
||||
android:layout_width="2px"
|
||||
android:layout_height="160px"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewHorizontalLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2px"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/viewVerticalLine"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCleanDisk"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewHorizontalLine"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="@id/viewVerticalLine"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:text="清理磁盘"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="52px"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewHorizontalLine"
|
||||
app:layout_constraintLeft_toRightOf="@id/viewVerticalLine"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:text="取消"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="52px"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/viewProgress"
|
||||
android:layout_width="791px"
|
||||
android:layout_height="42px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="275px"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/space_warning_progress_bg"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginBottom="18dp"
|
||||
>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbBagSelect"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:button="@drawable/badcase_radio_button_style"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etBagNameEdit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/cbBagSelect"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvBagTime"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:background="@null"
|
||||
android:drawableEnd="@drawable/icon_bag_edit"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBagReportStatus"
|
||||
android:layout_width="162dp"
|
||||
android:layout_height="68dp"
|
||||
android:background="@drawable/bag_reported_button_bg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:text="已上报"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28dp"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBagAudio"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvBagReportStatus"
|
||||
android:src="@drawable/icon_bag_audio"
|
||||
android:visibility="invisible"
|
||||
android:layout_marginEnd="30dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBagTime"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/ivBagAudio"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:gravity="start"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBagSize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#75FFFFFF"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvBagTime"
|
||||
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBagTimeTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="38px"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,228 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="960dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F0151D41"
|
||||
android:id="@+id/clLayout"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivManagerClose"
|
||||
android:layout_width="107dp"
|
||||
android:layout_height="107dp"
|
||||
android:layout_marginTop="66dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:src="@drawable/icon_close_nor"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewManagerTitleLine"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="80dp"
|
||||
android:layout_marginTop="92dp"
|
||||
android:background="#2966EC"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvManagerTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="任务管理"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="42dp"
|
||||
app:layout_constraintTop_toTopOf="@id/viewManagerTitleLine"
|
||||
app:layout_constraintBottom_toBottomOf="@id/viewManagerTitleLine"
|
||||
app:layout_constraintLeft_toLeftOf="@id/viewManagerTitleLine"
|
||||
android:layout_marginStart="50dp"
|
||||
/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clBagHaveDataLayout"
|
||||
android:layout_width="785dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewManagerTitleLine"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/viewManagerTitleLine"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pbSpacePercent"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="785dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:progressDrawable="@drawable/space_percent_bg"
|
||||
android:max="100"
|
||||
android:progress="10"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewUsedSpace"
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="23dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/pbSpacePercent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/pbSpacePercent"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/used_space_bg"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUsedSpaceContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintTop_toTopOf="@id/viewUsedSpace"
|
||||
app:layout_constraintBottom_toBottomOf="@id/viewUsedSpace"
|
||||
app:layout_constraintLeft_toRightOf="@id/viewUsedSpace"
|
||||
android:layout_marginStart="10dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFreeSpaceContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintRight_toRightOf="@id/pbSpacePercent"
|
||||
app:layout_constraintTop_toTopOf="@id/viewUsedSpace"
|
||||
app:layout_constraintBottom_toBottomOf="@id/viewUsedSpace"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewFreeSpace"
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="23dp"
|
||||
android:background="@drawable/unused_space_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/viewUsedSpace"
|
||||
app:layout_constraintBottom_toBottomOf="@id/viewUsedSpace"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvFreeSpaceContent"
|
||||
android:layout_marginEnd="10dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSelectAll"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="80dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewUsedSpace"
|
||||
android:layout_marginTop="50dp"
|
||||
android:background="@drawable/select_all_button_bg"
|
||||
android:text="一键全选"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36dp"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancelSelect"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="80dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSelectAll"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSelectAll"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvSelectAll"
|
||||
android:layout_marginStart="30dp"
|
||||
android:background="@drawable/cancel_select_button_bg"
|
||||
android:text="取消"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36dp"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSelectedBagSize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSelectAll"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSelectAll"
|
||||
app:layout_constraintRight_toRightOf="@id/pbSpacePercent"
|
||||
android:textColor="#FF00AFFF"
|
||||
android:textSize="34dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUploadCloud"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/pbSpacePercent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="120dp"
|
||||
android:background="@drawable/upload_cloud_button_bg"
|
||||
android:text="上云"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="42dp"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDeleteSelect"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvUploadCloud"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvUploadCloud"
|
||||
app:layout_constraintRight_toRightOf="@id/pbSpacePercent"
|
||||
android:background="@drawable/delete_button_bg"
|
||||
android:text="删除"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="42dp"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvBagList"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/pbSpacePercent"
|
||||
app:layout_constraintRight_toRightOf="@id/pbSpacePercent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSelectAll"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvUploadCloud"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clBagNoDataLayout"
|
||||
android:layout_width="785dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewManagerTitleLine"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/viewManagerTitleLine"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBagNoData"
|
||||
android:layout_width="@dimen/dp_317"
|
||||
android:layout_height="@dimen/dp_290"
|
||||
android:src="@drawable/icon_bag_no_data"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_400"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="暂无数据"
|
||||
android:textColor="#FFCAD6FF"
|
||||
android:textSize="@dimen/dp_44"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivBagNoData"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -350,4 +350,9 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
@Override
|
||||
public void onAutopilotStatusRespByQuery(@NonNull SystemStatusInfo.StatusInfo status) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRouteLineId(long lineId) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,8 +71,6 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
implementation rootProject.ext.dependencies.mogoami
|
||||
|
||||
implementation rootProject.ext.dependencies.android_start_up
|
||||
implementation rootProject.ext.dependencies.cicle_indicator
|
||||
implementation rootProject.ext.dependencies.koomnative
|
||||
@@ -116,8 +114,6 @@ dependencies {
|
||||
api project(':services:mogo-service')
|
||||
|
||||
api project(':libraries:mogo-map')
|
||||
api project(':test:crashreport-upgrade')
|
||||
// api project(':test:crashreport-bugly')
|
||||
api project(':test:crashreport-apmbyte')
|
||||
|
||||
api project(':core:mogo-core-res')
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui
|
||||
|
||||
import android.animation.Animator
|
||||
import android.app.Activity
|
||||
import android.content.*
|
||||
import android.graphics.*
|
||||
import android.graphics.drawable.*
|
||||
@@ -19,12 +20,14 @@ import android.view.animation.*
|
||||
import android.widget.*
|
||||
import androidx.core.view.*
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import bag_manager.BagManagerOuterClass
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.commons.context.ContextHolderUtil
|
||||
import com.mogo.commons.mvp.BaseFragment
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.commons.voice.*
|
||||
import com.mogo.eagle.core.data.badcase.BagManagerEntity
|
||||
import com.mogo.eagle.core.data.bindingcar.AdUpgradeStateHelper
|
||||
import com.mogo.eagle.core.data.bindingcar.IPCUpgradeStateInfo
|
||||
import com.mogo.eagle.core.data.camera.CameraEntity
|
||||
@@ -73,6 +76,8 @@ import com.mogo.eagle.core.function.hmi.ui.bindingcar.ToBindingCarDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.bindingcar.UpgradeAppDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.camera.CameraListView
|
||||
import com.mogo.eagle.core.function.hmi.ui.camera.RoadVideoDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxButtonView
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeCheckDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeTrafficDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.DebugSettingView
|
||||
@@ -101,6 +106,8 @@ import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.millis2String
|
||||
import com.zhidao.support.adas.high.common.MogoReport.Code.Error.EMAP.*
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.biz.BadCaseManagerView
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.biz.SpaceWarningDialog
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
import kotlinx.android.synthetic.main.fragment_hmi.*
|
||||
@@ -136,6 +143,10 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
private var mSOPSettingViewFloat: WarningFloat.Builder? = null
|
||||
private var mSOPSettingView: SOPSettingView? = null
|
||||
|
||||
//BadCaseManagerView
|
||||
private var mBadCaseManagerViewFloat: WarningFloat.Builder ?= null
|
||||
private var mBadCaseManagerView: BadCaseManagerView?= null
|
||||
|
||||
//StatusView
|
||||
private var statusBarView: StatusBarView? = null
|
||||
|
||||
@@ -181,6 +192,11 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
|
||||
private var busOperationStatus: IOchBusView? = null
|
||||
|
||||
private var bagManagerEntity: BagManagerEntity = BagManagerEntity()
|
||||
|
||||
private var spaceWarningDialog: SpaceWarningDialog ?=null
|
||||
private var isShowWarningDialog = false
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
@@ -253,41 +269,45 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cbMsgBoxDriver.setOnCheckedChangeListener { _, isChecked ->
|
||||
if(isChecked){
|
||||
viewDriverMsgBoxList.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxList.notifyData()
|
||||
viewDriverMsgBoxBubble.visibility = View.GONE
|
||||
viewDriverMsgBoxBubble.isShowData(false)
|
||||
CallerHmiManager.updateDriverMsgBoxTipView(false)
|
||||
}else{
|
||||
viewDriverMsgBoxList.visibility = View.GONE
|
||||
viewDriverMsgBoxBubble.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxBubble.isShowData(true)
|
||||
//消息盒子
|
||||
viewDriverMsgBoxButton.setClickListener(object: DriverMsgBoxButtonView.ClickListener{
|
||||
override fun showMsgBoxList(show: Boolean) {
|
||||
if(show){
|
||||
viewDriverMsgBoxList.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxList.notifyData()
|
||||
viewDriverMsgBoxBubble.visibility = View.GONE
|
||||
viewDriverMsgBoxBubble.isShowData(false)
|
||||
}else{
|
||||
viewDriverMsgBoxList.visibility = View.GONE
|
||||
viewDriverMsgBoxBubble.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxBubble.isShowData(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cbMsgBoxPassenger.setOnCheckedChangeListener { _, isChecked ->
|
||||
if(isChecked){
|
||||
viewPassengerMsgBoxList.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxBubble.visibility = View.GONE
|
||||
viewPassengerMsgBoxBubble.isShowData(false)
|
||||
CallerHmiManager.updatePassengerMsgBoxTipView(false)
|
||||
}else{
|
||||
viewPassengerMsgBoxList.visibility = View.GONE
|
||||
viewPassengerMsgBoxBubble.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxBubble.isShowData(true)
|
||||
})
|
||||
|
||||
viewPassengerMsgBoxButton.setClickListener(object: PassengerMsgBoxButtonView.ClickListener{
|
||||
override fun showMsgBoxList(show: Boolean) {
|
||||
if(show){
|
||||
viewPassengerMsgBoxList.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxBubble.visibility = View.GONE
|
||||
viewPassengerMsgBoxBubble.isShowData(false)
|
||||
}else{
|
||||
viewPassengerMsgBoxList.visibility = View.GONE
|
||||
viewPassengerMsgBoxBubble.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxBubble.isShowData(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
cbMsgBoxDriver.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxButton.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxBubble.visibility = View.VISIBLE
|
||||
}
|
||||
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
cbMsgBoxPassenger.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxButton.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxBubble.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
@@ -307,6 +327,17 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
setProxyTrafficLightView(viewTrafficLightVr)
|
||||
setProxyLimitingSpeedView(viewLimitingVelocity)
|
||||
setViewNotificationProvider(this)
|
||||
|
||||
// 开启定时查询速度
|
||||
Timer().schedule(timerTaskRefresh, Date(), 60*1000)
|
||||
}
|
||||
|
||||
private val timerTaskRefresh = object : TimerTask() {
|
||||
override fun run() {
|
||||
//请求磁盘空间使用情况
|
||||
bagManagerEntity.reqType = 1
|
||||
CallerAutoPilotManager.sendBagManagerCmd(bagManagerEntity)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getNotificationView(): IViewNotification? =
|
||||
@@ -375,10 +406,52 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBagManagerResult(bagManager: BagManagerOuterClass.BagManager) {
|
||||
super.onBagManagerResult(bagManager)
|
||||
//判断磁盘是否已满,展示预警弹窗
|
||||
UiThreadHandler.post{
|
||||
if(bagManager.reqType == 1){
|
||||
if(bagManager.spaceInfoRespCount>0){
|
||||
for(spaceInfo in bagManager.spaceInfoRespList){
|
||||
for(bagSpaceInfo in spaceInfo.bagDirsSpaceInfoList){
|
||||
if(bagSpaceInfo.free == 0L){
|
||||
//磁盘空间已满
|
||||
if(!isShowWarningDialog){
|
||||
if(spaceWarningDialog == null){
|
||||
spaceWarningDialog = SpaceWarningDialog(context as Activity)
|
||||
spaceWarningDialog?.setClickListener(object:SpaceWarningDialog.ClickListener{
|
||||
override fun showBadCaseManagerView() {
|
||||
if(mBadCaseManagerView == null){
|
||||
toggleBagManagerView()
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
spaceWarningDialog?.let {
|
||||
if(!it.isShowing){
|
||||
it.show()
|
||||
}
|
||||
}
|
||||
isShowWarningDialog = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
CallerAutopilotRecordListenerManager.removeListener(TAG)
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
try {
|
||||
timerTaskRefresh.cancel()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -469,20 +542,8 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
statusBarView?.updateMfStatus(tag, status)
|
||||
}
|
||||
|
||||
override fun updateDriverMsgBoxTipView(show: Boolean) {
|
||||
if(show){
|
||||
MsgBoxTipView?.visibility = View.VISIBLE
|
||||
}else{
|
||||
MsgBoxTipView?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun updatePassengerMsgBoxTipView(show: Boolean) {
|
||||
if(show){
|
||||
MsgBoxPTipView?.visibility = View.VISIBLE
|
||||
}else{
|
||||
MsgBoxPTipView?.visibility = View.GONE
|
||||
}
|
||||
override fun updateHDDataCacheStatus(isCached: Boolean) {
|
||||
toolsView?.updateHDDataCacheStatus(isCached)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -527,6 +588,12 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
override fun showSOPSettingView() {
|
||||
toggleSOPView()
|
||||
}
|
||||
|
||||
override fun showBadCaseManagerView() {
|
||||
dismissToolsFloatView()
|
||||
// CallerDevaToolsManager.showBadCaseManagerView(it)
|
||||
toggleBagManagerView()
|
||||
}
|
||||
})
|
||||
}
|
||||
toolsViewFloat = WarningFloat.with(it)
|
||||
@@ -800,6 +867,55 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
override fun toggleBagManagerView() {
|
||||
activity?.let{
|
||||
if (mBadCaseManagerViewFloat != null) {
|
||||
WarningFloat.dismiss(mBadCaseManagerViewFloat!!.config.floatTag, false)
|
||||
mBadCaseManagerViewFloat = null
|
||||
mBadCaseManagerView = null
|
||||
} else {
|
||||
if (mBadCaseManagerView == null) {
|
||||
mBadCaseManagerView = BadCaseManagerView(it)
|
||||
mBadCaseManagerView?.setOnClickListener(object: BadCaseManagerView.ClickListener{
|
||||
override fun onClose() {
|
||||
toggleBagManagerView()
|
||||
}
|
||||
})
|
||||
}
|
||||
mBadCaseManagerViewFloat = WarningFloat.with(it)
|
||||
.setTag("mBadCaseManagerView")
|
||||
.setLayout(mBadCaseManagerView!!)
|
||||
.setSidePattern(LEFT)
|
||||
.setGravity(Gravity.LEFT, offsetY = 70)
|
||||
.setImmersionStatusBar(false)
|
||||
.setWindowHeight(LayoutParams.MATCH_PARENT)
|
||||
.setAnimator(object : DefaultAnimator() {
|
||||
override fun enterAnim(
|
||||
view: View,
|
||||
params: LayoutParams,
|
||||
windowManager: WindowManager,
|
||||
sidePattern: SidePattern
|
||||
): Animator? =
|
||||
super.enterAnim(view, params, windowManager, sidePattern)
|
||||
?.apply {
|
||||
interpolator = OvershootInterpolator()
|
||||
}
|
||||
|
||||
override fun exitAnim(
|
||||
view: View,
|
||||
params: LayoutParams,
|
||||
windowManager: WindowManager,
|
||||
sidePattern: SidePattern
|
||||
): Animator? =
|
||||
super.exitAnim(view, params, windowManager, sidePattern)
|
||||
?.setDuration(200)
|
||||
})
|
||||
.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 展示VR下V2X预警
|
||||
*
|
||||
@@ -1091,25 +1207,27 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
* 控制展示限速标志及内容
|
||||
*/
|
||||
override fun showLimitingVelocity(limitingSpeed: Int, limitSpeedSource: Int) {
|
||||
// 控制 限速UI 展示
|
||||
if (HmiBuildConfig.isShowLimitingVelocityView) {
|
||||
if (limitingSpeed > 0) {
|
||||
mViewLimitingVelocity?.visibility = View.VISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(limitingSpeed, limitSpeedSource)
|
||||
tvLimitingSource?.visibility = View.VISIBLE
|
||||
if (limitSpeedSource == 1) {
|
||||
tvLimitingSource.text = "MAP"
|
||||
} else if (limitSpeedSource == 2) {
|
||||
tvLimitingSource.text = "RSU"
|
||||
ThreadUtils.runOnUiThread {
|
||||
// 控制 限速UI 展示
|
||||
if (HmiBuildConfig.isShowLimitingVelocityView) {
|
||||
if (limitingSpeed > 0) {
|
||||
mViewLimitingVelocity?.visibility = View.VISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(limitingSpeed, limitSpeedSource)
|
||||
tvLimitingSource?.visibility = View.VISIBLE
|
||||
if (limitSpeedSource == 1) {
|
||||
tvLimitingSource?.text = "MAP"
|
||||
} else if (limitSpeedSource == 2) {
|
||||
tvLimitingSource?.text = "RSU"
|
||||
}
|
||||
} else {
|
||||
mViewLimitingVelocity?.visibility = View.INVISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0, limitSpeedSource)
|
||||
tvLimitingSource?.visibility = View.INVISIBLE
|
||||
}
|
||||
} else {
|
||||
mViewLimitingVelocity?.visibility = View.INVISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0, limitSpeedSource)
|
||||
tvLimitingSource?.visibility = View.INVISIBLE
|
||||
disableLimitingVelocity()
|
||||
tvLimitingSource?.visibility = View.GONE
|
||||
}
|
||||
} else {
|
||||
disableLimitingVelocity()
|
||||
tvLimitingSource?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1556,7 +1674,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun setTurnLightFunction(isOpen: Boolean) {
|
||||
HmiBuildConfig.isShowTurnLightView = isOpen
|
||||
}
|
||||
@@ -1634,6 +1751,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
|
||||
override fun showSmallFragment() {
|
||||
CallerLogger.d("$M_HMI$TAG", "showSmallFragment start!")
|
||||
// 加载全览模式图层
|
||||
val fragmentOverview = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_OVERVIEW)
|
||||
.navigation() as BaseFragment
|
||||
@@ -1650,9 +1768,11 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}.commitAllowingStateLoss()
|
||||
}
|
||||
CallerDevaToolsManager.hideStatusBar()
|
||||
CallerLogger.d("$M_HMI$TAG", "showSmallFragment end!")
|
||||
}
|
||||
|
||||
override fun hideSmallFragment() {
|
||||
CallerLogger.d("$M_HMI$TAG", "hideSmallFragment start!")
|
||||
val fragmentOverview = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_OVERVIEW)
|
||||
.navigation() as BaseFragment
|
||||
activity?.supportFragmentManager?.beginTransaction()
|
||||
@@ -1662,6 +1782,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
?.commitAllowingStateLoss()
|
||||
CallerLogger.d("$M_HMI$TAG", "hideSmallFragment end!")
|
||||
// context?.let { CallerDevaToolsManager.showStatusBar(it, statusBarContainer) }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.map
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.ProgressBar
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.MainThread
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.core.view.marginTop
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
import com.mogo.map.hdcache.IHdCacheListener
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
/**
|
||||
* 离线地图缓存
|
||||
*/
|
||||
class OfflineMapDialog(context: Context): BaseFloatDialog(context) {
|
||||
|
||||
private var roundRootLayout: ConstraintLayout? = null
|
||||
private var offlineTitleView: TextView? = null
|
||||
private var leftView: TextView? = null
|
||||
private var rightView: TextView? = null
|
||||
private var okView: TextView? = null
|
||||
private var vertLineView: View? = null
|
||||
private var horizontalLineView: View? = null
|
||||
private var cacheTipView: TextView? = null
|
||||
|
||||
private var progressBar: ProgressBar? = null
|
||||
private var downloadPercentView: TextView? = null
|
||||
private var downloadResultImg: ImageView? = null
|
||||
|
||||
private var isLoading = false
|
||||
private var isConfirm = true
|
||||
private var isRetry = false
|
||||
|
||||
init {
|
||||
setContentView(R.layout.dialog_offline_map)
|
||||
setCanceledOnTouchOutside(true)
|
||||
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
roundRootLayout = findViewById(R.id.roundRootLayout)
|
||||
offlineTitleView = findViewById(R.id.tv_cache_title)
|
||||
progressBar = findViewById(R.id.progressBar)
|
||||
downloadPercentView = findViewById(R.id.tvDownloadProgress)
|
||||
leftView = findViewById(R.id.tv_cache_confirm)
|
||||
rightView = findViewById(R.id.tv_cache_cancel)
|
||||
okView = findViewById(R.id.tv_cache_ok)
|
||||
vertLineView = findViewById(R.id.view_vertical_line)
|
||||
horizontalLineView = findViewById(R.id.view_horizontal_line)
|
||||
cacheTipView = findViewById(R.id.tv_cache_tips)
|
||||
downloadResultImg = findViewById(R.id.iv_download_Status)
|
||||
|
||||
leftView?.setOnClickListener {
|
||||
when {
|
||||
isConfirm -> {
|
||||
showNewContent(isLoading = true, false)
|
||||
cacheHDOfflineData()
|
||||
}
|
||||
else -> {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rightView?.setOnClickListener {
|
||||
when {
|
||||
isRetry -> {
|
||||
showNewContent(isLoading = true, false)
|
||||
cacheHDOfflineData()
|
||||
}
|
||||
else -> {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
okView?.setOnClickListener {
|
||||
if (isLoading) {
|
||||
CallerMapUIServiceManager.cancelDownloadCacheData()
|
||||
}
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
private fun cacheHDOfflineData() {
|
||||
CallerMapUIServiceManager.cacheHDDataByCity(object : IHdCacheListener {
|
||||
override fun onMapHdCacheProgress(cityId: Int, progress: Double) {
|
||||
updateProgress(progress.toInt())
|
||||
}
|
||||
|
||||
override fun onMapHdCacheResult(cityId: Int, state: Int) {
|
||||
if (state == 0) {// 失败
|
||||
showNewContent(isLoading = false, false)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun updateProgress(progress: Int) {
|
||||
if (this@OfflineMapDialog.isShowing) {
|
||||
progressBar?.let {
|
||||
if (it.visibility == View.VISIBLE) {
|
||||
it.progress = if (progress in 1..5) 5 else progress
|
||||
}
|
||||
}
|
||||
downloadPercentView?.text = "$progress%"
|
||||
if (progress == 100) {
|
||||
showNewContent(isLoading = false, true)
|
||||
CallerHmiManager.updateHDDataCacheStatus(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun change2NewStyle() {
|
||||
roundRootLayout?.layoutParams?.width = AutoSizeUtils.dp2px(context, 1110f)
|
||||
roundRootLayout?.layoutParams?.height = AutoSizeUtils.dp2px(context, 668f)
|
||||
|
||||
val titleParams = offlineTitleView?.layoutParams as ConstraintLayout.LayoutParams
|
||||
titleParams.topMargin = AutoSizeUtils.dp2px(context, 51f)
|
||||
|
||||
val horizontalLineParams = horizontalLineView?.layoutParams as ConstraintLayout.LayoutParams
|
||||
horizontalLineParams.topMargin = AutoSizeUtils.dp2px(context, 374f)
|
||||
|
||||
progressBar?.visibility = View.VISIBLE
|
||||
downloadPercentView?.visibility = View.VISIBLE
|
||||
okView?.visibility = View.VISIBLE
|
||||
|
||||
vertLineView?.visibility = View.GONE
|
||||
leftView?.visibility = View.GONE
|
||||
rightView?.visibility = View.GONE
|
||||
cacheTipView?.visibility = View.INVISIBLE
|
||||
}
|
||||
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
private fun showNewContent(isLoading: Boolean, isSuccess: Boolean) {
|
||||
this.isLoading = isLoading
|
||||
change2NewStyle()
|
||||
when {
|
||||
isLoading -> {
|
||||
okView?.text = context.resources.getString(R.string.cancel)
|
||||
offlineTitleView?.text = context.resources.getString(R.string.offline_downloading)
|
||||
downloadResultImg?.visibility = View.GONE
|
||||
}
|
||||
else -> {
|
||||
downloadResultImg?.visibility = View.VISIBLE
|
||||
when {
|
||||
isSuccess -> {
|
||||
okView?.visibility = View.VISIBLE
|
||||
okView?.text = context.resources.getString(R.string.ok_tip)
|
||||
offlineTitleView?.text = context.resources.getString(R.string.offline_download_success)
|
||||
progressBar?.visibility = View.GONE
|
||||
downloadPercentView?.visibility = View.GONE
|
||||
downloadResultImg?.background = ContextCompat.getDrawable(context, R.drawable.download_success_icon)
|
||||
}
|
||||
else -> {
|
||||
isRetry = true
|
||||
isConfirm = false
|
||||
offlineTitleView?.text = context.resources.getString(R.string.offline_download_failure)
|
||||
okView?.visibility = View.GONE
|
||||
progressBar?.visibility = View.GONE
|
||||
downloadPercentView?.visibility = View.GONE
|
||||
leftView?.visibility = View.VISIBLE
|
||||
leftView?.text = context.resources.getString(R.string.ok_tip)
|
||||
rightView?.visibility = View.VISIBLE
|
||||
vertLineView?.visibility = View.VISIBLE
|
||||
rightView?.text = context.resources.getString(R.string.retry)
|
||||
downloadResultImg?.background = ContextCompat.getDrawable(context, R.drawable.download_fail_icon)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.DriverMsgBoxBubbleAdapter
|
||||
@@ -83,11 +84,15 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
if(isShowData){
|
||||
CallerHmiManager.updateDriverMsgBoxTipView(true)
|
||||
CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true)
|
||||
if(category == MsgCategory.RECORD_BAG){
|
||||
//弹出被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
|
||||
}else{
|
||||
if(!FunctionBuildConfig.isDemoMode){
|
||||
//弹出被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
|
||||
}
|
||||
} else if(category == MsgCategory.SYS_INFO){
|
||||
//todo 过滤MAP系统异常报警
|
||||
} else{
|
||||
clMsgBubbleLayout.visibility = View.VISIBLE
|
||||
dataList.add(msgBoxBean)
|
||||
driverMsgBoxBubbleAdapter?.setData(dataList)
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import kotlinx.android.synthetic.main.view_driver_msg_box_button.view.*
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 消息盒子司机端视图切换按钮
|
||||
* @since: 2023/1/31
|
||||
*/
|
||||
class DriverMsgBoxButtonView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
):ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxEventListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "DriverMsgBoxButtonView"
|
||||
}
|
||||
|
||||
private var clickListener: ClickListener? = null
|
||||
|
||||
init{
|
||||
LayoutInflater.from(context).inflate(R.layout.view_driver_msg_box_button, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
cbMsgBoxDriver.setOnCheckedChangeListener { _, isChecked ->
|
||||
clickListener?.showMsgBoxList(isChecked)
|
||||
msgBoxTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxEventListenerManager.addListener(TAG,this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxEventListenerManager.removeListener(TAG)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSummaryClickEvent() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新新消息提醒红点
|
||||
* @param isShow true:展示;false:不展示
|
||||
*/
|
||||
override fun onUpdateTipEvent(isShow: Boolean) {
|
||||
if(isShow){
|
||||
msgBoxTipView.visibility = View.VISIBLE
|
||||
}else{
|
||||
msgBoxTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBubbleOperationClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
cbMsgBoxDriver.performClick()
|
||||
}
|
||||
|
||||
override fun onBubbleV2XClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
cbMsgBoxDriver.performClick()
|
||||
}
|
||||
|
||||
override fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
cbMsgBoxDriver.performClick()
|
||||
}
|
||||
|
||||
fun setClickListener(clickListener: ClickListener) {
|
||||
this.clickListener = clickListener
|
||||
}
|
||||
|
||||
interface ClickListener{
|
||||
fun showMsgBoxList(show: Boolean)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -10,7 +10,9 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
@@ -32,7 +34,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) , IMsgBoxListener {
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) , IMsgBoxListener, IMsgBoxEventListener {
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_driver_msg_box_list, this, true)
|
||||
@@ -43,11 +45,13 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
private var ipcReportList: ArrayList<MsgBoxBean> ?= null
|
||||
private var badCaseList: ArrayList<MsgBoxBean> ?= null
|
||||
private var driverMsgBoxListAdapter: DriverMsgBoxListAdapter ?=null
|
||||
private var linearLayoutManager: LinearLayoutManager ?= null
|
||||
|
||||
private fun initView() {
|
||||
driverMsgBoxListAdapter= DriverMsgBoxListAdapter(context as Activity)
|
||||
rvMsgBoxList.adapter = driverMsgBoxListAdapter
|
||||
rvMsgBoxList.layoutManager = LinearLayoutManager(context)
|
||||
linearLayoutManager = LinearLayoutManager(context)
|
||||
rvMsgBoxList.layoutManager = linearLayoutManager
|
||||
|
||||
//获取通知消息列表
|
||||
noticeList= CallerMsgBoxManager.getCachedNotifyData() as ArrayList<MsgBoxBean>?
|
||||
@@ -195,6 +199,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
super.onAttachedToWindow()
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
CallerMsgBoxEventListenerManager.addListener(TAG,this)
|
||||
EventBus.getDefault().register(this)
|
||||
}
|
||||
}
|
||||
@@ -203,6 +208,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
super.onDetachedFromWindow()
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
CallerMsgBoxEventListenerManager.removeListener(TAG)
|
||||
EventBus.getDefault().unregister(this)
|
||||
}
|
||||
}
|
||||
@@ -214,4 +220,37 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
it.remove(msgBoxList)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSummaryClickEvent() {
|
||||
|
||||
}
|
||||
|
||||
override fun onUpdateTipEvent(isShow: Boolean) {
|
||||
|
||||
}
|
||||
|
||||
override fun onBubbleOperationClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
MsgBoxConfig.setUserRecord(0)
|
||||
notifyData()
|
||||
noticeList?.let {
|
||||
rvMsgBoxList?.scrollToPosition(it.indexOf(msgBoxBean))
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBubbleV2XClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
MsgBoxConfig.setUserRecord(0)
|
||||
notifyData()
|
||||
noticeList?.let {
|
||||
rvMsgBoxList?.scrollToPosition(it.indexOf(msgBoxBean))
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
MsgBoxConfig.setUserRecord(1)
|
||||
notifyData()
|
||||
ipcReportList?.let {
|
||||
linearLayoutManager?.scrollToPositionWithOffset(it.indexOf(msgBoxBean),0)
|
||||
driverMsgBoxListAdapter?.setReportShowData(msgBoxBean)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.PassengerMsgBoxBubbleAdapter
|
||||
@@ -64,7 +65,7 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
|| msgBoxList.type == MsgBoxType.OBU){
|
||||
MsgBoxConfig.noticeList.add(msgBoxList)
|
||||
if(isShowData){
|
||||
CallerHmiManager.updatePassengerMsgBoxTipView(true)
|
||||
CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true)
|
||||
dataList.add(msgBoxList)
|
||||
passengerMsgBoxBubbleAdapter?.setData(dataList)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import kotlinx.android.synthetic.main.view_passenger_msg_box_button.view.*
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 消息盒子乘客端视图切换按钮
|
||||
* @since: 2023/1/31
|
||||
*/
|
||||
class PassengerMsgBoxButtonView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
): ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxEventListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "PassengerMsgBoxButtonView"
|
||||
}
|
||||
|
||||
private var clickListener: ClickListener? = null
|
||||
|
||||
init{
|
||||
LayoutInflater.from(context).inflate(R.layout.view_passenger_msg_box_button, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
cbMsgBoxPassenger.setOnCheckedChangeListener { _, isChecked ->
|
||||
clickListener?.showMsgBoxList(isChecked)
|
||||
msgBoxPTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxEventListenerManager.addListener(TAG,this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxEventListenerManager.removeListener(TAG)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSummaryClickEvent() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新新消息提醒红点
|
||||
* @param isShow true:展示;false:不展示
|
||||
*/
|
||||
override fun onUpdateTipEvent(isShow: Boolean) {
|
||||
if(isShow){
|
||||
msgBoxPTipView.visibility = View.VISIBLE
|
||||
}else{
|
||||
msgBoxPTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBubbleOperationClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
cbMsgBoxPassenger.performClick()
|
||||
}
|
||||
|
||||
override fun onBubbleV2XClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
cbMsgBoxPassenger.performClick()
|
||||
}
|
||||
|
||||
override fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
cbMsgBoxPassenger.performClick()
|
||||
}
|
||||
|
||||
fun setClickListener(clickListener: ClickListener) {
|
||||
this.clickListener = clickListener
|
||||
}
|
||||
|
||||
interface ClickListener{
|
||||
fun showMsgBoxList(show: Boolean)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,7 +11,9 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
@@ -30,7 +32,7 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener {
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener, IMsgBoxEventListener {
|
||||
|
||||
private val TAG = "PassengerMsgBoxListView"
|
||||
var passengerMsgBoxListAdapter: PassengerMsgBoxListAdapter ?= null
|
||||
@@ -78,6 +80,7 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
|
||||
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
CallerMsgBoxEventListenerManager.addListener(TAG,this)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +89,30 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
|
||||
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
CallerMsgBoxEventListenerManager.removeListener(TAG)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSummaryClickEvent() {
|
||||
|
||||
}
|
||||
|
||||
override fun onUpdateTipEvent(isShow: Boolean) {
|
||||
|
||||
}
|
||||
|
||||
override fun onBubbleOperationClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
|
||||
}
|
||||
|
||||
override fun onBubbleV2XClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
noticeList?.let {
|
||||
rvPassengerList.scrollToPosition(it.indexOf(msgBoxBean))
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,12 +13,14 @@ import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
import com.mogo.eagle.core.widget.RoundCanClickConstraintLayout
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
@@ -75,14 +77,19 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
when (holder) {
|
||||
is BubbleOperationHolder -> {
|
||||
data?.let {
|
||||
val operationMsg = it[position].bean as OperationMsg
|
||||
val msgBoxBean = it[position]
|
||||
val operationMsg = msgBoxBean.bean as OperationMsg
|
||||
holder.tvBubbleOperationTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvBubbleOperationContent.text = operationMsg.content
|
||||
holder.clBubbleOperationLayout.setOnClickListener {
|
||||
CallerMsgBoxEventListenerManager.invokeBubbleOperationListener(msgBoxBean)
|
||||
}
|
||||
}
|
||||
}
|
||||
is BubbleReportHolder -> {
|
||||
data?.let {
|
||||
val reportEntity = it[position].bean as ReportEntity
|
||||
val msgBoxBean = it[position]
|
||||
val reportEntity = msgBoxBean.bean as ReportEntity
|
||||
holder.tvBubbleReportTime.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvBubbleReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
var resultStr = "类型:"
|
||||
@@ -90,6 +97,9 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
resultStr = "${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}"
|
||||
}
|
||||
holder.tvBubbleReportType.text = resultStr
|
||||
holder.clReportLayout.setOnClickListener {
|
||||
CallerMsgBoxEventListenerManager.invokeBubbleReportListener(msgBoxBean)
|
||||
}
|
||||
}
|
||||
}
|
||||
is BubbleNoticeHolder -> {
|
||||
@@ -139,6 +149,9 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
holder.tvV2XContent.text = v2XMsg.content
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
holder.clV2XLayout.setOnClickListener {
|
||||
CallerMsgBoxEventListenerManager.invokeBubbleV2XListener(msgBoxBean)
|
||||
}
|
||||
}
|
||||
}
|
||||
is BubbleSummaryHolder -> {
|
||||
@@ -190,12 +203,14 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
var tvBubbleReportTime: TextView = itemView.findViewById(R.id.tvBubbleReportTime)
|
||||
var tvBubbleReportType: TextView = itemView.findViewById(R.id.tvBubbleReportType)
|
||||
var tvBubbleReceiveTime: TextView = itemView.findViewById(R.id.tvBubbleReceiveTime)
|
||||
var clReportLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clReportLayout)
|
||||
}
|
||||
|
||||
//运营平台
|
||||
class BubbleOperationHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvBubbleOperationTime: TextView = itemView.findViewById(R.id.tvBubbleOperationTime)
|
||||
var tvBubbleOperationContent: TextView = itemView.findViewById(R.id.tvBubbleOperationContent)
|
||||
var clBubbleOperationLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clBubbleOperationLayout)
|
||||
}
|
||||
|
||||
//Notice
|
||||
@@ -212,6 +227,7 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
var ivV2XImage: ImageView = itemView.findViewById(R.id.ivV2XImage)
|
||||
var tvV2XTime: TextView = itemView.findViewById(R.id.tvV2XTime)
|
||||
var tvV2XContent: TextView = itemView.findViewById(R.id.tvV2XContent)
|
||||
var clV2XLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clV2XLayout)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
|
||||
@@ -31,6 +31,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
|
||||
private var data: List<MsgBoxBean>? = null
|
||||
private var reportBean: MsgBoxBean ?= null
|
||||
|
||||
private val operation: Int = 1
|
||||
private val notice: Int = 2
|
||||
@@ -49,6 +50,10 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun setReportShowData(reportClickBean: MsgBoxBean){
|
||||
reportBean = reportClickBean
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
when (viewType) {
|
||||
record -> {
|
||||
@@ -102,6 +107,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
}
|
||||
is MsgBoxIpcReportHolder -> {
|
||||
data?.let { it ->
|
||||
val reportMsgBox = it[position]
|
||||
holder.tvReportTimeNormal.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text =
|
||||
@@ -137,6 +143,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
holder.tvReportTypeNormal.text = resultStr
|
||||
holder.tvReportTypeOpen.text = resultStr
|
||||
holder.tvReportReasonOpen.text = "原因:${reportEntity.msg}"
|
||||
holder.tvReportSrcOpen.text = "消息来源:${reportEntity.src}"
|
||||
var actionStr = ""
|
||||
for (action in reportEntity.actionsList) {
|
||||
actionStr =
|
||||
@@ -151,6 +158,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.tvStatusSelect.text = "折叠"
|
||||
holder.ivReportImageNormal.visibility = View.GONE
|
||||
holder.tvReportLevelNormal.visibility = View.GONE
|
||||
holder.tvReportTimeNormal.visibility = View.GONE
|
||||
@@ -161,6 +169,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
holder.tvReportTimeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportTypeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportReasonOpen.visibility = View.VISIBLE
|
||||
holder.tvReportSrcOpen.visibility = View.VISIBLE
|
||||
holder.tvReportActionOpen.visibility = View.VISIBLE
|
||||
} else {
|
||||
holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds(
|
||||
@@ -169,6 +178,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.tvStatusSelect.text = "展开"
|
||||
holder.ivReportImageNormal.visibility = View.VISIBLE
|
||||
holder.tvReportLevelNormal.visibility = View.VISIBLE
|
||||
holder.tvReportTimeNormal.visibility = View.VISIBLE
|
||||
@@ -179,9 +189,16 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
holder.tvReportTimeOpen.visibility = View.GONE
|
||||
holder.tvReportTypeOpen.visibility = View.GONE
|
||||
holder.tvReportReasonOpen.visibility = View.GONE
|
||||
holder.tvReportSrcOpen.visibility = View.GONE
|
||||
holder.tvReportActionOpen.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
reportBean?.let {
|
||||
if(reportMsgBox.timestamp == it.timestamp){
|
||||
holder.tvStatusSelect.performClick()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
is MsgBoxOperation -> {
|
||||
@@ -199,6 +216,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.tvOperationStatusSelect.text = "折叠"
|
||||
holder.ivOperationImageNormal.visibility = View.GONE
|
||||
holder.tvOperationTitleNormal.visibility = View.GONE
|
||||
holder.tvOperationContentNormal.visibility = View.GONE
|
||||
@@ -213,6 +231,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.tvOperationStatusSelect.text = "展开"
|
||||
holder.ivOperationImageNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationTitleNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationContentNormal.visibility = View.VISIBLE
|
||||
@@ -328,6 +347,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
var tvReportTimeOpen: TextView = itemView.findViewById(R.id.tvReportTimeOpen)
|
||||
var tvReportTypeOpen: TextView = itemView.findViewById(R.id.tvReportTypeOpen)
|
||||
var tvReportReasonOpen: TextView = itemView.findViewById(R.id.tvReportReasonOpen)
|
||||
var tvReportSrcOpen: TextView = itemView.findViewById(R.id.tvReportSrcOpen)
|
||||
var tvReportActionOpen: TextView = itemView.findViewById(R.id.tvReportActionOpen)
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
import com.mogo.eagle.core.widget.RoundCanClickConstraintLayout
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
@@ -104,6 +105,9 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
holder.clPassengerVeXLayout.setOnClickListener {
|
||||
CallerMsgBoxEventListenerManager.invokeBubbleV2XListener(msgBoxBean)
|
||||
}
|
||||
}
|
||||
}
|
||||
is BubbleSummaryHolder -> {
|
||||
@@ -114,7 +118,7 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
holder.tvPassengerSummaryCheck.setOnClickListener {
|
||||
//跳转全览模式
|
||||
// CallerHmiManager.showSmallFragment()
|
||||
CallerMsgBoxEventListenerManager.invokeListener()
|
||||
CallerMsgBoxEventListenerManager.invokeSummaryListener()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -163,6 +167,7 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
var ivPassengerV2XImage: ImageView = itemView.findViewById(R.id.ivPassengerV2XImage)
|
||||
var tvPassengerV2XTime: TextView = itemView.findViewById(R.id.tvPassengerV2XTime)
|
||||
var tvPassengerV2XContent: TextView = itemView.findViewById(R.id.tvPassengerV2XContent)
|
||||
var clPassengerVeXLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clPassengerVeXLayout)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
|
||||
@@ -106,7 +106,7 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
||||
holder.tvPassengerSummaryCheck.setOnClickListener {
|
||||
//跳转全览模式
|
||||
// CallerHmiManager.showSmallFragment()
|
||||
CallerMsgBoxEventListenerManager.invokeListener()
|
||||
CallerMsgBoxEventListenerManager.invokeSummaryListener()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,34 +72,49 @@ class PncActionsView @JvmOverloads constructor(
|
||||
|
||||
@BizConfig(FOUNDATION, "", BIZ_PNC_ACTIONS)
|
||||
override fun pncActions(planningActionMsg: MessagePad.PlanningActionMsg) {
|
||||
mAutoPilotStatusInfo?.let { it ->
|
||||
if (it.state == STATUS_AUTOPILOT_RUNNING) {
|
||||
try {
|
||||
mAutoPilotStatusInfo?.let { it ->
|
||||
UiThreadHandler.post {
|
||||
var actions: String? = null
|
||||
planningActionMsg.actionMsg?.let {
|
||||
actions = PncActionsHelper.getAction(it.drivingState.number, it.drivingAction.number)
|
||||
if (it.state == STATUS_AUTOPILOT_RUNNING) {
|
||||
var actions: String? = null
|
||||
planningActionMsg.actionMsg?.let {
|
||||
actions = PncActionsHelper.getAction(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
|
||||
//如果是存在云端红绿灯数据条件下,设置云端数据
|
||||
if (PncActionsHelper.isWaitingTrafficlight(it.drivingState.number, it.drivingAction.number)
|
||||
&& mTrafficLightResult != null
|
||||
&& getWaitTrafficlightTime().isNotBlank()) {
|
||||
actions += ",预计${getWaitTrafficlightTime()}秒后通过"
|
||||
} else {
|
||||
mTrafficLightResult = null
|
||||
//如果是存在云端红绿灯数据条件下,设置云端数据
|
||||
if (PncActionsHelper.isWaitingTrafficlight(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
&& mTrafficLightResult != null
|
||||
&& getWaitTrafficlightTime().isNotBlank()
|
||||
) {
|
||||
actions += ",预计${getWaitTrafficlightTime()}秒后通过"
|
||||
} else {
|
||||
mTrafficLightResult = null
|
||||
}
|
||||
}
|
||||
}
|
||||
// update view
|
||||
if (actions.isNullOrEmpty()) {
|
||||
// update view
|
||||
if (actions.isNullOrEmpty()) {
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
} else {
|
||||
this.background =
|
||||
AppCompatResources.getDrawable(context, R.drawable.pnc_actions_bg)
|
||||
tvHmiPncActions.text = actions
|
||||
}
|
||||
|
||||
} else {
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
} else {
|
||||
this.background = AppCompatResources.getDrawable(context, R.drawable.pnc_actions_bg)
|
||||
tvHmiPncActions.text = actions
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onTrafficLightStatus(trafficLightResult: TrafficLightResult) {
|
||||
|
||||
@@ -80,7 +80,6 @@ import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.*
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifecycleOwner
|
||||
import com.zhidao.easysocket.utils.L
|
||||
import com.zhidao.support.adas.high.other.permission.BackgrounderPermission
|
||||
import com.zhjt.mogo_core_function_devatools.env.*
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
@@ -235,7 +234,10 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
CallerAutopilotVehicleStateListenerManager.removeListener(TAG)
|
||||
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener( FuncBizConfig.FOUNDATION, TAG)
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(
|
||||
FuncBizConfig.FOUNDATION,
|
||||
TAG
|
||||
)
|
||||
|
||||
if (logInfoView != null) {
|
||||
logInfoView!!.onEnterBackground()
|
||||
@@ -577,7 +579,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
btnDrawFusion.isChecked = FunctionBuildConfig.isFusionColor
|
||||
btnDrawFusion.setOnCheckedChangeListener{_, isChecked ->
|
||||
btnDrawFusion.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isFusionColor = isChecked
|
||||
}
|
||||
|
||||
@@ -587,7 +589,11 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
// 演示模式
|
||||
tbIsDemoMode.setOnCheckedChangeListener { _, _ ->
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
CallerHmiManager.updateStatusBarLeftView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(context))
|
||||
CallerHmiManager.updateStatusBarLeftView(
|
||||
FunctionBuildConfig.isDemoMode,
|
||||
"demoMode",
|
||||
DemoModeView(context)
|
||||
)
|
||||
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
if (!FunctionBuildConfig.isDemoMode) {
|
||||
//关闭美化模式时,通知工控机
|
||||
@@ -645,7 +651,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
tbDrawRomaMode.isChecked = FunctionBuildConfig.isRomaMode
|
||||
//云端感知绘制
|
||||
//漫游模式开启控制
|
||||
tbDrawRomaMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isRomaMode = isChecked
|
||||
if (!FunctionBuildConfig.isRomaMode) {
|
||||
@@ -653,6 +659,19 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
tbRomaModeStyle.isChecked = FunctionBuildConfig.romaModeStyle == 1
|
||||
//漫游模式选择
|
||||
tbRomaModeStyle.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
FunctionBuildConfig.romaModeStyle = 1
|
||||
} else {
|
||||
FunctionBuildConfig.romaModeStyle = 0
|
||||
}
|
||||
if (FunctionBuildConfig.romaModeStyle != 1) {
|
||||
tbRomaModeStyle.isChecked = false
|
||||
}
|
||||
}
|
||||
|
||||
//重启工控机所有节点
|
||||
btnIpcReboot.onClick {
|
||||
CallerAutoPilotManager.sendIpcReboot()
|
||||
@@ -1297,7 +1316,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
* 设置是否输出OBU日志 true-打印日志,false-不打印日志
|
||||
*/
|
||||
tbObuLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
L.setEnableLog(isChecked)
|
||||
CallerOBUManager.setObuLog(isChecked)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1865,9 +1884,9 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
mTrajectoryInfoSize = 0
|
||||
mRouteInfoSize = 0
|
||||
|
||||
if(FunctionBuildConfig.isDemoMode){
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
tbIsDemoMode.text = "关闭美化模式"
|
||||
}else{
|
||||
} else {
|
||||
tbIsDemoMode.text = "开启美化模式"
|
||||
}
|
||||
|
||||
@@ -1956,7 +1975,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
when (type) {
|
||||
BIZ_BEAUTY_MODE -> {
|
||||
tbIsDemoMode.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbIsDemoMode.currentPadding()
|
||||
val (left, top, right, bottom) = tbIsDemoMode.currentPadding()
|
||||
if (lock) {
|
||||
tbIsDemoMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
@@ -1964,11 +1983,11 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tbIsDemoMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
}
|
||||
tbIsDemoMode.setPadding(left,top,right,bottom)
|
||||
tbIsDemoMode.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_RAIN_MODE -> {
|
||||
tbIsRainMode.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbIsRainMode.currentPadding()
|
||||
val (left, top, right, bottom) = tbIsRainMode.currentPadding()
|
||||
if (lock) {
|
||||
tbIsRainMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
@@ -1976,21 +1995,21 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tbIsRainMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
}
|
||||
tbIsRainMode.setPadding(left,top,right,bottom)
|
||||
tbIsRainMode.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_WARNING_UPLOAD -> {
|
||||
tbReportWarning.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbReportWarning.currentPadding()
|
||||
val (left, top, right, bottom) = tbReportWarning.currentPadding()
|
||||
if (lock) {
|
||||
tbReportWarning.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
tbReportWarning.background = null
|
||||
}
|
||||
tbReportWarning.setPadding(left,top,right,bottom)
|
||||
tbReportWarning.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_BAG_RECORD -> {
|
||||
val (left,top,right,bottom) = btnRecordBag.currentPadding()
|
||||
val (left, top, right, bottom) = btnRecordBag.currentPadding()
|
||||
if (lock) {
|
||||
btnRecordBag.isClickable = false
|
||||
btnRecordBag.background =
|
||||
@@ -2000,10 +2019,10 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
btnRecordBag.requestFocus()
|
||||
btnRecordBag.background = null
|
||||
}
|
||||
btnRecordBag.setPadding(left,top,right,bottom)
|
||||
btnRecordBag.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_FULL_LOG -> {
|
||||
val (left,top,right,bottom) = tbLogCatch.currentPadding()
|
||||
val (left, top, right, bottom) = tbLogCatch.currentPadding()
|
||||
if (lock) {
|
||||
tbLogCatch.isClickable = false
|
||||
tbLogCatch.background =
|
||||
@@ -2013,7 +2032,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tbLogCatch.requestFocus()
|
||||
tbLogCatch.background = null
|
||||
}
|
||||
tbLogCatch.setPadding(left,top,right,bottom)
|
||||
tbLogCatch.setPadding(left, top, right, bottom)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,7 +157,10 @@ class SOPSettingView @JvmOverloads constructor(
|
||||
// 演示模式,上一次勾选的数据
|
||||
tbDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
// 演示模式
|
||||
tbDemoMode.setOnCheckedChangeListener { _, _ ->
|
||||
tbDemoMode.setOnCheckedChangeListener { compoundButton, _ ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
CallerHmiManager.updateStatusBarLeftView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(context))
|
||||
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
@@ -175,7 +178,10 @@ class SOPSettingView @JvmOverloads constructor(
|
||||
// 雨天模式,上一次勾选的数据
|
||||
tbRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
//雨天模式
|
||||
tbRainMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
tbRainMode.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
CallerAutoPilotManager.setRainMode(isChecked)
|
||||
FunctionBuildConfig.isRainMode = isChecked
|
||||
}
|
||||
@@ -191,7 +197,7 @@ class SOPSettingView @JvmOverloads constructor(
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerOBUManager.resetObuIpAddress("192.168.1.199")
|
||||
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerOBUManager.resetObuIpAddress("192.168.8.199")
|
||||
CallerOBUManager.resetObuIpAddress("192.168.1.199")
|
||||
}
|
||||
} else {
|
||||
//断开链接
|
||||
@@ -268,11 +274,8 @@ class SOPSettingView @JvmOverloads constructor(
|
||||
private val timerTaskRefresh = object : TimerTask(){
|
||||
override fun run() {
|
||||
UiThreadHandler.post{
|
||||
if(FunctionBuildConfig.isDemoMode){
|
||||
tbDemoMode.text = "关闭美化模式"
|
||||
}else{
|
||||
tbDemoMode.text = "开启美化模式"
|
||||
}
|
||||
tbDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
tbRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,39 +285,27 @@ class SOPSettingView @JvmOverloads constructor(
|
||||
when (type) {
|
||||
FuncBizConfig.BIZ_BEAUTY_MODE -> {
|
||||
tbDemoMode.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbDemoMode.currentPadding()
|
||||
if (lock) {
|
||||
tbDemoMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
tbDemoMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
if(lock){
|
||||
tbDemoMode.visibility = View.INVISIBLE
|
||||
}else{
|
||||
tbDemoMode.visibility = View.VISIBLE
|
||||
}
|
||||
tbDemoMode.setPadding(left,top,right,bottom)
|
||||
}
|
||||
FuncBizConfig.BIZ_RAIN_MODE -> {
|
||||
tbRainMode.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbRainMode.currentPadding()
|
||||
if (lock) {
|
||||
tbRainMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
tbRainMode.visibility = View.INVISIBLE
|
||||
} else {
|
||||
tbRainMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
tbRainMode.visibility = View.VISIBLE
|
||||
}
|
||||
tbRainMode.setPadding(left,top,right,bottom)
|
||||
}
|
||||
FuncBizConfig.BIZ_PNC_WARNING -> {
|
||||
tbMarkingObstacles.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbMarkingObstacles.currentPadding()
|
||||
if (lock) {
|
||||
tbMarkingObstacles.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
tbMarkingObstacles.visibility = View.INVISIBLE
|
||||
} else {
|
||||
tbMarkingObstacles.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
tbMarkingObstacles.visibility = View.VISIBLE
|
||||
}
|
||||
tbMarkingObstacles.setPadding(left,top,right,bottom)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.os.Process
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
@@ -22,7 +21,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showTurnLight
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.KeyBoardUtil
|
||||
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
|
||||
@@ -100,14 +98,15 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
sopLayout.setOnClickListener {
|
||||
clickListener?.showSOPSettingView()
|
||||
}
|
||||
managerLayout.setOnClickListener {
|
||||
//录包管理页面
|
||||
clickListener?.showBadCaseManagerView()
|
||||
}
|
||||
viewCheckStatus.setOnClickListener {
|
||||
clickListener?.go2CheckPage()
|
||||
}
|
||||
ivDebugPanel.setOnClickListener {
|
||||
clickListener?.showDebugPanelView()
|
||||
|
||||
|
||||
|
||||
}
|
||||
ivDebugFeedback.onClick {
|
||||
clickListener?.showFeedbackView()
|
||||
@@ -202,6 +201,9 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
systemVersionView?.showAdUpgradeStatus(ipcUpgradeStateInfo)
|
||||
}
|
||||
|
||||
fun updateHDDataCacheStatus(isCached: Boolean) {
|
||||
systemVersionView?.updateHDDataCacheStatus(isCached)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
@@ -225,6 +227,7 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
fun showDebugPanelView()
|
||||
fun showFeedbackView()
|
||||
fun showSOPSettingView()
|
||||
fun showBadCaseManagerView()
|
||||
}
|
||||
|
||||
override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) {
|
||||
|
||||
@@ -100,6 +100,11 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
|
||||
private final IMoGoAutopilotStatusListener mGoAutopilotStatusListener = new IMoGoAutopilotStatusListener() {
|
||||
|
||||
@Override
|
||||
public void onAutopilotRouteLineId(long lineId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotIpcConnectStatusChanged(int status, @Nullable String reason) {
|
||||
}
|
||||
|
||||
@@ -1,26 +1,21 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.app.NotificationManager
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.app.NotificationCompat
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.bindingcar.AdUpgradeStateHelper
|
||||
import com.mogo.eagle.core.data.bindingcar.IPCUpgradeStateInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.bindingcar.IMoGoBindingCarListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMogoDevaToolsUpgradeListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingCarListenerManager
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsUpgradeListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showUpgradeDialog
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.map.OfflineMapDialog
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
@@ -56,6 +51,8 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
private var previousProgress: Int = -1 //前一秒的下载进度,用于计算下载剩余时间
|
||||
private var currentProgress: Int = -1 //当前已下载包体大小
|
||||
|
||||
private var isHDCached = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_system_version, this, true)
|
||||
initView()
|
||||
@@ -142,6 +139,16 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
|
||||
ivHDCache.setOnClickListener {
|
||||
if (isHDCached) {// 已缓存
|
||||
ToastUtils.showShort(resources.getString(R.string.offline_had_downloaded))
|
||||
} else {// 未缓存
|
||||
OfflineMapDialog(context).show()
|
||||
}
|
||||
}
|
||||
|
||||
updateHDDataCacheStatus(CallerMapUIServiceManager.isCityDataCached())
|
||||
|
||||
if(AdUpgradeStateHelper.isConfirmUpgrade()){
|
||||
//将角标改为“下载中”
|
||||
ivAdStatus?.setImageResource(R.drawable.icon_downloading)
|
||||
@@ -246,6 +253,15 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
|
||||
fun updateHDDataCacheStatus(isCached: Boolean) {
|
||||
if (isCached) {
|
||||
ivHDCacheStatus?.setImageResource(R.drawable.icon_latest_version)
|
||||
} else {
|
||||
ivHDCacheStatus?.setImageResource(R.drawable.icon_be_updated)
|
||||
}
|
||||
isHDCached = isCached
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示当前鹰眼版本
|
||||
*/
|
||||
|
||||
@@ -445,6 +445,11 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRouteLineId(long lineId) {
|
||||
|
||||
}
|
||||
|
||||
private void updateConnectInfoView(@NonNull AutopilotStatusInfo autoPilotStatusInfo) {
|
||||
if (!isFloatingLayerHidden) {// 遮罩层显示的时候
|
||||
mConnAdapter.updateData(autoPilotStatusInfo);
|
||||
|
||||
@@ -10,10 +10,8 @@ import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Process;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
@@ -25,7 +23,6 @@ import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
@@ -76,6 +73,11 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
private long pressEDownTime = 0;
|
||||
private long pressEUpTime = 0;
|
||||
|
||||
private int clickTime = 300; //单击
|
||||
private int clickTimeInterval = 330;
|
||||
private int longPressTime = 670;
|
||||
private int longPressTimeInterval = 700;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
@@ -219,7 +221,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressADownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A down pressADownTime = " + pressADownTime + "---" + (pressADownTime - startPressTime) + "----isCombinationKey = " + isCombinationKey + "--pressBDownTime = " + pressBDownTime);
|
||||
if ((pressADownTime - startPressTime) > 360 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) {
|
||||
if ((pressADownTime - startPressTime) > clickTimeInterval && (pressADownTime - startPressTime) < longPressTime && pressBDownTime > 0) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 A 按AB组合 +1 ");
|
||||
}
|
||||
@@ -228,7 +230,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
}
|
||||
|
||||
if (isCombinationKey != 3 && isCombinationKey != 1) {
|
||||
if ((pressADownTime - startPressTime) > 1320) {
|
||||
if ((pressADownTime - startPressTime) > longPressTimeInterval) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按A -2 ");
|
||||
}
|
||||
@@ -239,7 +241,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
pressAUpTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A up pressAUpTime = " + pressAUpTime + "---" + (pressAUpTime - startPressTime) + "--pressBDownTime = " + pressBDownTime);
|
||||
if ((pressAUpTime - startPressTime) < 350 && isCombinationKey != 3) {
|
||||
if ((pressAUpTime - startPressTime) < clickTime && isCombinationKey != 3) {
|
||||
isCombinationKey = 1;
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击A -1 ");
|
||||
@@ -260,7 +262,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressBDownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B down pressBDownTime = " + pressBDownTime + "--差-" + (pressBDownTime - startPressTime) + "---isCombinationKey = " + isCombinationKey + "--pressADownTime = " + pressADownTime);
|
||||
if ((pressBDownTime - startPressTime) > 360 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) {
|
||||
if ((pressBDownTime - startPressTime) > clickTimeInterval && (pressBDownTime - startPressTime) < longPressTime && pressADownTime > 0) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 B 按AB组合 +1 ");
|
||||
}
|
||||
@@ -268,7 +270,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
isCombinationKey = 3;
|
||||
}
|
||||
if (isCombinationKey != 3 && isCombinationKey != 1) {
|
||||
if ((pressBDownTime - startPressTime) > 1320) {
|
||||
if ((pressBDownTime - startPressTime) > longPressTimeInterval) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按B 无操作 ");
|
||||
}
|
||||
@@ -278,7 +280,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
pressBUpTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B up pressBUpTime = " + pressBUpTime + "--差-" + (pressBUpTime - startPressTime) + "--pressADownTime = " + pressADownTime);
|
||||
if ((pressBUpTime - startPressTime) < 350 && isCombinationKey != 3) {
|
||||
if ((pressBUpTime - startPressTime) < clickTime && isCombinationKey != 3) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击B 0 ");
|
||||
}
|
||||
@@ -300,7 +302,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressCDownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按C 无操作 time dif = " + (pressCDownTime - startPressTime));
|
||||
if ((pressCDownTime - startPressTime) > 1320) {
|
||||
if ((pressCDownTime - startPressTime) > longPressTimeInterval) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按C 无操作 ");
|
||||
}
|
||||
@@ -309,7 +311,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
pressCUpTime = System.currentTimeMillis();
|
||||
isPressEnd = false;
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击C ← 向左变道 time dif = " + (pressCUpTime - startPressTime));
|
||||
if ((pressCUpTime - startPressTime) < 350) {
|
||||
if ((pressCUpTime - startPressTime) < clickTime) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击C ← 向左变道 ");
|
||||
}
|
||||
@@ -321,7 +323,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressDDownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按D 无操作 time dif = " + (pressDDownTime - startPressTime));
|
||||
if ((pressDDownTime - startPressTime) > 1320) {
|
||||
if ((pressDDownTime - startPressTime) > longPressTimeInterval) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按D 无操作 ");
|
||||
}
|
||||
@@ -330,7 +332,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
pressDUpTime = System.currentTimeMillis();
|
||||
isPressEnd = false;
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击D → 向右变道 time dif = " + (pressDUpTime - startPressTime));
|
||||
if ((pressDUpTime - startPressTime) < 350) {
|
||||
if ((pressDUpTime - startPressTime) < clickTime) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击D → 向右变道 ");
|
||||
}
|
||||
@@ -342,7 +344,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressEDownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按E 鸣笛 time dif = " + (pressEDownTime - startPressTime));
|
||||
if ((pressEDownTime - startPressTime) > 1320) {
|
||||
if ((pressEDownTime - startPressTime) > longPressTimeInterval) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按E 鸣笛 ");
|
||||
}
|
||||
@@ -362,7 +364,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
pressEUpTime = System.currentTimeMillis();
|
||||
isPressEnd = false;
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "方块 单击E 开启自动驾驶 time dif = " + (pressEUpTime - startPressTime));
|
||||
if ((pressEUpTime - startPressTime) < 350) {
|
||||
if ((pressEUpTime - startPressTime) < clickTime) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击E 开启自动驾驶 ");
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.ProcessUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.SPUtils;
|
||||
import com.mogo.map.MapApiPath;
|
||||
import com.zhidao.support.obu.ami.AmiClientManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
@@ -60,7 +59,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
return;
|
||||
}
|
||||
start = System.currentTimeMillis();
|
||||
connectAmiIp();
|
||||
// Crash 日志收集
|
||||
initCrashConfig();
|
||||
initLogConfig();
|
||||
@@ -202,14 +200,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
OverviewDb.Companion.getDb(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* 连接ami
|
||||
*/
|
||||
private void connectAmiIp() {
|
||||
String ipAddress = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp().getBaseContext()).getString(MoGoConfig.OBU_IP, "192.168.1.199");
|
||||
AmiClientManager.getInstance().setObuIp(ipAddress);
|
||||
}
|
||||
|
||||
private void initModules() {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "initModules");
|
||||
//och模块
|
||||
|
||||
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 设置背景色 -->
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<corners android:radius="21dp" />
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<stroke android:color="#7CF6FF" android:width="2dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- <item android:id="@android:id/secondaryProgress"-->
|
||||
<!-- android:start="1.5dp"-->
|
||||
<!-- android:end="1.5dp"-->
|
||||
<!-- android:top="1.5dp"-->
|
||||
<!-- android:bottom="1.5dp"-->
|
||||
<!-- >-->
|
||||
<!-- <scale android:scaleWidth="100%">-->
|
||||
<!-- <shape>-->
|
||||
<!-- <corners android:radius="21dp" />-->
|
||||
<!-- <solid android:color="@android:color/holo_green_light" />-->
|
||||
<!-- </shape>-->
|
||||
<!-- </scale>-->
|
||||
<!-- </item>-->
|
||||
|
||||
<!-- 设置进度条颜色 -->
|
||||
<item android:id="@android:id/progress"
|
||||
android:start="2dp"
|
||||
android:end="2dp"
|
||||
android:top="2dp"
|
||||
android:bottom="2dp"
|
||||
>
|
||||
<scale android:scaleWidth="100%">
|
||||
<shape>
|
||||
<corners android:radius="21dp" />
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:endColor="#00E5FF"
|
||||
android:startColor="#374171" />
|
||||
</shape>
|
||||
</scale>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/roundRootLayout"
|
||||
android:layout_width="840dp"
|
||||
android:layout_height="488dp"
|
||||
android:background="@color/dialog_bg_color_90_percent"
|
||||
app:roundLayoutRadius="32dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cache_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="66dp"
|
||||
android:text="@string/offline_map_cache_tip"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="56dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cache_tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="52dp"
|
||||
android:text="@string/cache_offline_map_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="43dp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_cache_title" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="800dp"
|
||||
android:layout_height="42dp"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_cache_title"
|
||||
android:layout_marginTop="113dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/progressbar_corner_bg"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDownloadProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/progressBar"
|
||||
android:layout_marginTop="50dp"
|
||||
android:text="0%"
|
||||
android:textColor="#06D1ED"
|
||||
android:textSize="43dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_download_Status"
|
||||
android:layout_width="174dp"
|
||||
android:layout_height="174dp"
|
||||
android:layout_marginTop="96dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_cache_title"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/view_horizontal_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="205dp"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_cache_title" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_vertical_line"
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_horizontal_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cache_confirm"
|
||||
android:layout_width="419dp"
|
||||
android:layout_height="137dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/confirm"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="46dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/view_vertical_line"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_horizontal_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cache_cancel"
|
||||
android:layout_width="419dp"
|
||||
android:layout_height="137dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/cancel"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="46dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/view_vertical_line"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_horizontal_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cache_ok"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/ok_tip"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="46dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/view_vertical_line"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_horizontal_line" />
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||