移除废弃的功能集合

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-01-18 20:21:53 +08:00
parent 2513a56bec
commit 2d5daf757f
17 changed files with 9 additions and 862 deletions

View File

@@ -104,8 +104,6 @@ internal object BridgeApi {
fun registerCenter() = apis?.registerCenterApi
fun entranceButton() = apis?.entranceButtonController
fun imageLoader() = apis?.imageLoaderApi
fun windowManager() = apis?.windowManagerApi

View File

@@ -241,30 +241,9 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
}
}
// M1 不基于地图的版本直接展示事件面板,且不可关闭
if (DebugConfig.isMapBased()) {
val x = resources.getDimensionPixelSize(if (DebugConfig.isLauncher()) {
R.dimen.module_v2x_event_panel_in_launcher_btn_x
} else {
R.dimen.module_v2x_event_panel_btn_x
})
val y = resources.getDimensionPixelSize(R.dimen.module_v2x_event_panel_btn_y)
BridgeApi.entranceButton()?.let {
it.addBottomLayerView(mV2XEventPanelHistoryCountView, x, y)
}
mV2XEventPanelHistoryCountView?.visibility = if (MogoApisHandler.getInstance().apis.statusManagerApi.isVrMode) {
View.GONE
}else{
View.VISIBLE
}
changeEventCount()
MogoApisHandler.getInstance().apis.statusManagerApi.registerStatusChangedListener(MODULE_NAME, StatusDescriptor.VR_MODE, this)
} else {
// 模拟手动点击,默认选择第二个,周边事件
// http://jira.zhidaohulian.com/browse/E84XAD-250
mRgTabSelect?.check(R.id.rbSurroundingEvent)
}
// 模拟手动点击,默认选择第二个,周边事件
// http://jira.zhidaohulian.com/browse/E84XAD-250
mRgTabSelect?.check(R.id.rbSurroundingEvent)
} catch (e: Exception) {
e.printStackTrace()

View File

@@ -3,8 +3,6 @@ package com.mogo.eagle.core.function.v2x.events.scenario.scene.help;
import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.MODULE_NAME;
import android.os.CountDownTimer;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.Nullable;
@@ -16,17 +14,15 @@ import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager;
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener;
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceConstants;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
import com.mogo.eagle.core.utilcode.util.Utils;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.module.v2x.voice.V2XVoiceManager;
import com.mogo.service.entrance.ButtonIndex;
import com.mogo.service.entrance.IMogoEntranceButtonController;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
import com.mogo.service.statusmanager.IMogoStatusManager;
import com.mogo.service.statusmanager.StatusDescriptor;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
/**
* @ProjectName: MoGoModulSafeDriving
@@ -69,15 +65,6 @@ public class V2XCarForHelpScenario extends AbsV2XScenario<Boolean> implements IM
showButton();
mySeekHelpCountDownTimerCancel();
mySeekHelpCountDownTimerStart();
if (cancelCb == null) {
cancelCb = (command, intent) -> {
IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton();
TextView tv = entranceButton != null ? entranceButton.getButton(ButtonIndex.BUTTON2) : null;
if (tv != null) {
showDialog();
}
};
}
unregisterSeekHelpButtonCmd();
V2XVoiceManager.INSTANCE.registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CANCEL_HELP, cancelCb);
V2XVoiceManager.INSTANCE.registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_CANCEL_FOR_HELP_UN_WAKEUP, cancelCb);
@@ -109,7 +96,7 @@ public class V2XCarForHelpScenario extends AbsV2XScenario<Boolean> implements IM
if (getV2XButton() != null) {
getV2XButton().setOnActionListener(this::showDialog);
getV2XButton().show();
// V2XServiceManager.getMogoEntranceButtonController().showLeftNoticeByType(IMogoEntranceButtonController.NOTICE_TYPE_SEEK_HELP, R.drawable.module_v2x_left_notice_seek_help, "正在发起求助...");
// V2XServiceManager.getMogoEntranceButtonController().showLeftNoticeByType(IMogoEntranceButtonController.NOTICE_TYPE_SEEK_HELP, R.drawable.module_v2x_left_notice_seek_help, "正在发起求助...");
}
});
}
@@ -123,10 +110,6 @@ public class V2XCarForHelpScenario extends AbsV2XScenario<Boolean> implements IM
}
if (isSeekHelping) {
Logger.d(TAG, "关闭自车求助按钮!");
IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton();
if (entranceButton != null) {
entranceButton.hideLeftNoticeByType(IMogoEntranceButtonController.NOTICE_TYPE_SEEK_HELP);
}
statusManager.setSeekHelping(TAG, false);
if (getV2XButton() != null) {
getV2XButton().close();
@@ -246,33 +229,6 @@ public class V2XCarForHelpScenario extends AbsV2XScenario<Boolean> implements IM
entity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP);
entity.setContent(isTrue);
init(entity);
} else if (descriptor == StatusDescriptor.VR_MODE) {
boolean isSeekHelping = false;
IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
if (statusManager != null) {
isSeekHelping = statusManager.isSeekHelping();
}
if (isSeekHelping) {
if (isTrue) {
((V2XSeekHelpButton) getV2XButton()).showTopView();
IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton();
if (entranceButton != null) {
TextView button = entranceButton.getButton(ButtonIndex.BUTTON2);
if (button != null) {
button.setVisibility(View.GONE);
}
}
} else {
((V2XSeekHelpButton) getV2XButton()).closeTopView();
IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton();
if (entranceButton != null) {
TextView button = entranceButton.getButton(ButtonIndex.BUTTON2);
if (button != null) {
button.setVisibility(View.VISIBLE);
}
}
}
}
}
}
}

View File

@@ -5,8 +5,8 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.mogo.eagle.core.data.BaseData;
import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.data.BaseData;
import com.mogo.eagle.core.function.v2x.R;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.eagle.core.function.v2x.events.network.V2XRefreshCallback;
@@ -17,9 +17,6 @@ import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener;
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceConstants;
import com.mogo.eagle.core.utilcode.util.Utils;
import com.mogo.module.v2x.voice.V2XVoiceManager;
import com.mogo.service.entrance.ButtonIndex;
import com.mogo.service.entrance.IMogoEntranceButtonController;
import com.mogo.service.statusmanager.IMogoStatusManager;
import com.mogo.service.windowview.IMogoTopViewManager;
/**
@@ -57,34 +54,6 @@ public class V2XSeekHelpButton implements IV2XButton {
@Override
public void show() {
registerVoice();
try {
IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton();
tv = entranceButton != null ? entranceButton.getButton(ButtonIndex.BUTTON2) : null;
if (tv != null) {
tv.setText("取消\n求助");
tv.setOnClickListener(v -> {
//调用取消求助接口
// TODO: 2020/5/18 回调,显示对话框
doAction();
});
}
boolean isVrMode = false;
IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
if (statusManager != null) {
isVrMode = statusManager.isVrMode();
}
if (isVrMode) {
showTopView();
tv.setVisibility(View.GONE);
} else {
closeTopView();
tv.setVisibility(View.VISIBLE);
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void showTopView() {

View File

@@ -4,15 +4,11 @@ import android.content.Intent;
import android.view.View;
import android.widget.TextView;
import com.mogo.eagle.core.function.v2x.R;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XButton;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XButtonListener;
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener;
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceConstants;
import com.mogo.module.v2x.voice.V2XVoiceManager;
import com.mogo.service.entrance.ButtonIndex;
import com.mogo.service.entrance.IMogoEntranceButtonController;
/**
* 道路实况按钮
@@ -36,19 +32,6 @@ public class V2XRoadEventButton implements IV2XButton {
public void show() {
// 注册语音交互
registerVoice();
IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton();
tv = entranceButton != null ? entranceButton.getButton(ButtonIndex.BUTTON1) : null;
if (tv != null){
tv.setText("查看\n详情");
tv.setBackgroundResource(R.drawable.bg_v2x_event_live_show);
tv.setVisibility(View.VISIBLE);
tv.setOnClickListener(v -> {
if (mListener != null) {
mListener.onAction();
}
close();
});
}
}
@Override