[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) { if (v2xFaultHelpDialog == null) {
v2xFaultHelpDialog = new V2XSeekHelpDialog(V2XServiceManager.getContext()); v2xFaultHelpDialog = new V2XSeekHelpDialog(V2XServiceManager.getContext());
} }
v2xFaultHelpDialog.setOnClickListener(new V2XSeekHelpDialog.OnClickListener() { // v2xFaultHelpDialog.setOnClickListener(new V2XSeekHelpDialog.OnClickListener() {
@Override // @Override
public void onClickLeft() { // public void onClickLeft() {
//放弃求助 // //放弃求助
/* if (V2XServiceManager.getMoGoStatusManager().isSeekHelping()) { // /* if (V2XServiceManager.getMoGoStatusManager().isSeekHelping()) {
V2XServiceManager.getMoGoStatusManager().setSeekHelping(TAG, false); // V2XServiceManager.getMoGoStatusManager().setSeekHelping(TAG, false);
}*/ // }*/
closeButton(); // closeButton();
v2xFaultHelpDialog.dismiss(); // v2xFaultHelpDialog.dismiss();
} // }
//
@Override // @Override
public void onClickRight() { // public void onClickRight() {
//继续求助 // //继续求助
v2xFaultHelpDialog.dismiss(); // v2xFaultHelpDialog.dismiss();
//
} // }
}); // });
v2xFaultHelpDialog.show(); // v2xFaultHelpDialog.show();
closeButton();
} }

View File

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