Merge branch 'qa_byd' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into qa_byd
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 19 KiB |
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.content.IntentFilter;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -11,11 +12,14 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.location.IMogoLocationListener;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.model.MogoPoi;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
@@ -53,7 +57,8 @@ import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
|
||||
@Route(path = V2XConst.PATH_V2X_UI)
|
||||
public class V2XModuleProvider implements
|
||||
IMogoModuleProvider,
|
||||
IMogoStatusChangedListener {
|
||||
IMogoStatusChangedListener,
|
||||
IMogoMapListener {
|
||||
private final String TAG = "V2XMocduleProvider";
|
||||
|
||||
private Context mContext;
|
||||
@@ -125,6 +130,9 @@ public class V2XModuleProvider implements
|
||||
handleAdas();
|
||||
initData();
|
||||
|
||||
|
||||
V2XServiceManager.getMogoRegisterCenter().registerMogoMapListener(V2XConst.MODULE_NAME, this);
|
||||
|
||||
// 注册广播接收场景弹窗使用的
|
||||
SceneBroadcastReceiver localReceiver = new SceneBroadcastReceiver();
|
||||
LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(context);
|
||||
@@ -145,16 +153,12 @@ public class V2XModuleProvider implements
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
//初始化获得自车求助状态
|
||||
initCarForHelpStatus();
|
||||
|
||||
try {
|
||||
// 查询ACC状态
|
||||
SharedPrefsMgr.getInstance(V2XUtils.getApp()).putBoolean("descriptor_ACC_STATUS", isAccOn());
|
||||
if (isAccOn()) {
|
||||
// 记录开机时间
|
||||
FatigueDrivingUtils.refreshAccOnTime();
|
||||
initCarForHelpStatus();
|
||||
// 刷新配置文件
|
||||
refreshStrategyConfig();
|
||||
} else {
|
||||
@@ -293,4 +297,40 @@ public class V2XModuleProvider implements
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapLoaded() {
|
||||
//初始化获得自车求助状态
|
||||
initCarForHelpStatus();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTouch(MotionEvent motionEvent) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPOIClick(MogoPoi poi) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapClick(MogoLatLng latLng) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLockMap(boolean isLock) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapModeChanged(EnumMapUI ui) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapChanged(MogoLatLng latLng, float zoom, float tilt, float bearing) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,15 +50,19 @@ public class V2XSeekHelpButton implements IV2XButton {
|
||||
@Override
|
||||
public void show() {
|
||||
registerVoice();
|
||||
tv = V2XServiceManager.getMogoEntranceButtonController().getButton(ButtonIndex.BUTTON2);
|
||||
tv.setText("取消\n求助");
|
||||
tv.setVisibility(View.VISIBLE);
|
||||
tv.setBackgroundResource(R.drawable.bg_v2x_event_live_show);
|
||||
tv.setOnClickListener(v -> {
|
||||
//调用取消求助接口
|
||||
// TODO: 2020/5/18 回调,显示对话框
|
||||
doAction();
|
||||
});
|
||||
try {
|
||||
tv = V2XServiceManager.getMogoEntranceButtonController().getButton(ButtonIndex.BUTTON2);
|
||||
tv.setText("取消\n求助");
|
||||
tv.setVisibility(View.VISIBLE);
|
||||
tv.setBackgroundResource(R.drawable.bg_v2x_event_live_show);
|
||||
tv.setOnClickListener(v -> {
|
||||
//调用取消求助接口
|
||||
// TODO: 2020/5/18 回调,显示对话框
|
||||
doAction();
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user