[fix] 取消故障求助 隐藏弹框

This commit is contained in:
liujing
2020-11-06 20:19:51 +08:00
parent 4af222571a
commit 7ed3e4834d
2 changed files with 34 additions and 30 deletions

View File

@@ -191,25 +191,26 @@ public class V2XCarForHelpScenario extends AbsV2XScenario<Boolean> implements IM
if (v2xFaultHelpDialog == null) {
v2xFaultHelpDialog = new V2XSeekHelpDialog(V2XServiceManager.getContext());
}
v2xFaultHelpDialog.setOnClickListener(new V2XSeekHelpDialog.OnClickListener() {
@Override
public void onClickLeft() {
//放弃求助
/* if (V2XServiceManager.getMoGoStatusManager().isSeekHelping()) {
V2XServiceManager.getMoGoStatusManager().setSeekHelping(TAG, false);
}*/
closeButton();
v2xFaultHelpDialog.dismiss();
}
@Override
public void onClickRight() {
//继续求助
v2xFaultHelpDialog.dismiss();
}
});
v2xFaultHelpDialog.show();
// v2xFaultHelpDialog.setOnClickListener(new V2XSeekHelpDialog.OnClickListener() {
// @Override
// public void onClickLeft() {
// //放弃求助
// /* if (V2XServiceManager.getMoGoStatusManager().isSeekHelping()) {
// V2XServiceManager.getMoGoStatusManager().setSeekHelping(TAG, false);
// }*/
// closeButton();
// v2xFaultHelpDialog.dismiss();
// }
//
// @Override
// public void onClickRight() {
// //继续求助
// v2xFaultHelpDialog.dismiss();
//
// }
// });
// v2xFaultHelpDialog.show();
closeButton();
}

View File

@@ -84,15 +84,18 @@ public class V2XSeekHelpDialog extends ConstraintLayout implements View.OnClickL
public void show() {
try {
Logger.d(TAG, "使用windowManager实现");
if ( windowManager == null ) {
windowManager = new WindowManagerView.Builder(
V2XServiceManager.getMogoEntranceButtonController().getButton(ButtonIndex.BUTTON2).getContext()
).contentView(this).build();
}
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("确定要解除求助状态吗");
unRegisterVoiceCmd();
registerVoiceCmd();
windowManager.show();
// if ( windowManager == null ) {
// windowManager = new WindowManagerView.Builder(
// V2XServiceManager.getMogoEntranceButtonController().getButton(ButtonIndex.BUTTON2).getContext()
// ).contentView(this).build();
// }
// AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("确定要解除求助状态吗");
// unRegisterVoiceCmd();
// registerVoiceCmd();
// windowManager.show();
handleLeft();
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("已取消");
} catch (Exception e) {
e.printStackTrace();
}
@@ -120,7 +123,7 @@ public class V2XSeekHelpDialog extends ConstraintLayout implements View.OnClickL
if (mListener != null) {
mListener.onClickLeft();
}
unRegisterVoiceCmd();
// unRegisterVoiceCmd();
}
//继续求助
@@ -128,7 +131,7 @@ public class V2XSeekHelpDialog extends ConstraintLayout implements View.OnClickL
if (mListener != null) {
mListener.onClickRight();
}
unRegisterVoiceCmd();
// unRegisterVoiceCmd();
}
private void registerVoiceCmd() {