1. merge
2. bugfix
This commit is contained in:
@@ -79,22 +79,20 @@ public class V2XSeekHelpDialog extends ConstraintLayout implements View.OnClickL
|
||||
void onClickRight();
|
||||
}
|
||||
|
||||
private boolean isShown;
|
||||
private WindowManagerView windowManager;
|
||||
|
||||
public void show() {
|
||||
try {
|
||||
Logger.d(TAG, "使用windowManager实现");
|
||||
if (!isShown) {
|
||||
if ( windowManager == null ) {
|
||||
windowManager = new WindowManagerView.Builder(
|
||||
V2XServiceManager.getMogoEntranceButtonController().getButton(ButtonIndex.BUTTON2).getContext()
|
||||
).contentView(this).build();
|
||||
windowManager.show();
|
||||
isShown = true;
|
||||
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("确定要解除求助状态吗");
|
||||
unRegisterVoiceCmd();
|
||||
registerVoiceCmd();
|
||||
}
|
||||
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("确定要解除求助状态吗");
|
||||
unRegisterVoiceCmd();
|
||||
registerVoiceCmd();
|
||||
windowManager.show();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -111,10 +109,10 @@ public class V2XSeekHelpDialog extends ConstraintLayout implements View.OnClickL
|
||||
};
|
||||
|
||||
public void dismiss() {
|
||||
if (isShown && windowManager != null) {
|
||||
if (windowManager != null) {
|
||||
windowManager.dismiss();
|
||||
isShown = false;
|
||||
}
|
||||
windowManager = null;
|
||||
}
|
||||
|
||||
//放弃求助
|
||||
|
||||
Reference in New Issue
Block a user