This commit is contained in:
unknown
2020-11-09 11:45:27 +08:00
6 changed files with 62 additions and 45 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

@@ -68,7 +68,7 @@ public class V2XSeekHelpButton implements IV2XButton {
@Override
public void close() {
if (tv != null) {
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("将为您取消", null);
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("取消", null);
tv.setVisibility(View.GONE);
V2XServiceManager.getV2XRefreshModel().cancelHelpSignal(new V2XRefreshCallback<BaseData>() {
@Override

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() {

View File

@@ -1,10 +1,12 @@
package com.mogo.module.v2x.utils;
import com.mogo.commons.network.Utils;
import com.mogo.module.common.entity.MarkerLocation;
import com.mogo.module.common.entity.MarkerUserInfo;
import com.mogo.module.v2x.V2XConst;
import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.network.utils.Util;
import com.zhidao.carchattingprovider.CallChattingProviderConstant;
import com.zhidao.carchattingprovider.ICallChatResponse;
@@ -62,6 +64,16 @@ public class ChartingUtil {
*/
public static void isOnLine(String sn, ChartStatusListener chartStatusListener) {
try {
String isMe = Utils.getSn();
if (isMe.equals(sn)) {
Logger.d("", "是我的分享");
if (chartStatusListener != null) {
chartStatusListener.canCall(false);
return;
}
} else {
Logger.d("", "不是我的分享");
}
V2XServiceManager.getCarsChattingProvider().isOnLine(
"CAR_CALL_TO_" + V2XConst.MODULE_NAME,
V2XUtils.getApp(),

View File

@@ -83,12 +83,12 @@ class SimpleCoverVideoPlayer : StandardGSYVideoPlayer {
}
override fun updateStartImage() {
// super.updateStartImage()
//
// when (mCurrentState) {
// GSYVideoView.CURRENT_STATE_PAUSE -> start.visibility = View.VISIBLE
// else -> start.visibility = View.INVISIBLE
// }
super.updateStartImage()
when (mCurrentState) {
GSYVideoView.CURRENT_STATE_PAUSE -> start.visibility = View.VISIBLE
else -> start.visibility = View.INVISIBLE
}
}
fun setFullClickListener(listener: OnClickListener) {

View File

@@ -71,13 +71,14 @@
<!--GSYVideoControlView mLoadingProgressBar-->
//加载中圈圈
<ProgressBar
android:id="@+id/loading"
android:layout_width="@dimen/dp_56"
android:layout_height="@dimen/dp_56"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:indeterminateTint="#256BFF"
android:visibility="gone" />
<ProgressBar
android:id="@+id/loading"
android:layout_width="@dimen/dp_56"
android:layout_height="@dimen/dp_56"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:indeterminateTint="#256BFF"
android:visibility="gone" />
</RelativeLayout>