Merge branch 'dev_minibus-d_230425_3.2.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_minibus-d_230425_3.2.0
This commit is contained in:
@@ -7,4 +7,5 @@ package com.mogo.och.bus.passenger.callback;
|
||||
public interface IBusPassegerDriverStatusCallback {
|
||||
void changeOperationStatus(boolean changeStatus);
|
||||
void updatePlateNumber(String plateNumber);
|
||||
void updateDriverSn(String sn);
|
||||
}
|
||||
|
||||
@@ -377,7 +377,10 @@ public class BusPassengerModel {
|
||||
private final IReceivedMsgListener mReceivedMsgListener = new IReceivedMsgListener() {
|
||||
@Override
|
||||
public void onReceivedServerSn(@Nullable String sn) {
|
||||
|
||||
Logger.d(SceneConstant.M_BUS_P+TAG,"onReceivedServerSn = "+sn);
|
||||
if (mDriverStatusCallback != null) {
|
||||
mDriverStatusCallback.updateDriverSn(sn);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -126,6 +126,11 @@ public class BaseBusPassengerPresenter extends Presenter<BusPassengerRouteFragme
|
||||
// runOnUIThread(() -> mView.updatePlateNum(plateNumber));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDriverSn(String sn) {
|
||||
runOnUIThread(() -> mView.updateDriverSn(sn));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateLineInfo(String lineName, String lineDurTime) {
|
||||
runOnUIThread(() -> mView.updateLineInfo(lineName, lineDurTime));
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.annotation.SuppressLint;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -59,6 +60,8 @@ public class BusPassengerRouteFragment extends
|
||||
private AppCompatTextView mCurrentArriveStationTitle;
|
||||
private AppCompatTextView mCurrentArriveTip;
|
||||
private AppCompatImageView mSpeakArrivedIv;
|
||||
|
||||
private View busPDriverMonitorView;
|
||||
private DriverMonitorView driverMonitorView;
|
||||
private ConstraintLayout indicatorView;
|
||||
private View mapIndicator;
|
||||
@@ -116,21 +119,15 @@ public class BusPassengerRouteFragment extends
|
||||
mapIndicator = findViewById(R.id.firstIndicator);
|
||||
liveIndicator = findViewById(R.id.secondIndicator);
|
||||
|
||||
driverMonitorView = new DriverMonitorView(getContext());
|
||||
busPDriverMonitorView = LayoutInflater.from(getContext())
|
||||
.inflate(R.layout.bus_p_driver_monitor_view,null);
|
||||
|
||||
driverMonitorView = busPDriverMonitorView.findViewById(R.id.buDriverMonitorView);
|
||||
driverMonitorView.setLiveListener(new DriverMonitorView.LiveListener() {
|
||||
@Override
|
||||
public void onPlayError() {
|
||||
goneLiveShadow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showOrHideLiveBtn(boolean isShow) {
|
||||
if (isShow){
|
||||
visibleLiveShadow();
|
||||
}else {
|
||||
goneLiveShadow();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//测试
|
||||
@@ -151,7 +148,7 @@ public class BusPassengerRouteFragment extends
|
||||
|
||||
private void initLiveView() {
|
||||
views.add(new View(getContext()));// 其实是空的,真正小地图还在fragment里
|
||||
views.add(driverMonitorView);
|
||||
views.add(busPDriverMonitorView);
|
||||
mapAndLiveVideoView.setData(views);
|
||||
mapAndLiveVideoView.setVisibility(View.GONE);
|
||||
indicatorView.setVisibility(View.GONE);
|
||||
@@ -172,6 +169,14 @@ public class BusPassengerRouteFragment extends
|
||||
mMapDirectionView.setVisibility(position == 0? View.VISIBLE:View.GONE);
|
||||
}
|
||||
|
||||
public void updateDriverSn(String sn) {
|
||||
if (driverMonitorView.isSOPDriverSn(sn)){
|
||||
visibleLiveShadow();
|
||||
}else {
|
||||
goneLiveShadow();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void openOrCloseLiveVideo() {
|
||||
if (videoSwitch.isSelected()){
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#CDDBF6" />
|
||||
<corners android:bottomLeftRadius="@dimen/dp_20"
|
||||
android:bottomRightRadius="@dimen/dp_20"/>
|
||||
</shape>
|
||||
@@ -38,6 +38,7 @@
|
||||
android:background="@drawable/roma_bus_p_bg_selector"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:layout_marginLeft="10dp"
|
||||
app:layout_constraintLeft_toRightOf="@+id/video_switch_iv"
|
||||
app:roma_close="@drawable/roma_bus_p_bg_selector"
|
||||
app:roma_open="@drawable/iv_roma_bus_passenger_press_bg" />
|
||||
@@ -85,6 +86,7 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_20"/>
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bottom_radius_bg">
|
||||
<com.amap.api.maps.TextureMapView
|
||||
android:id="@+id/bus_p_line_amap_view"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -239,12 +239,12 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.widget.DriverMonitorView-->
|
||||
<!-- android:id="@+id/driverMonitorView"-->
|
||||
<!-- android:layout_width="@dimen/bus_p_route_info_panel_width"-->
|
||||
<!-- android:layout_height="@dimen/bus_p_route_line_map_view_height"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent" />-->
|
||||
<com.mogo.och.bus.passenger.ui.MapAndLiveVideoView
|
||||
android:id="@+id/mapAndLiveVideoView"
|
||||
android:layout_width="@dimen/bus_p_route_info_panel_width"
|
||||
android:layout_height="@dimen/bus_p_route_line_map_view_height"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/busIndicatorView"
|
||||
@@ -274,11 +274,4 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.MapAndLiveVideoView
|
||||
android:id="@+id/mapAndLiveVideoView"
|
||||
android:layout_width="@dimen/bus_p_route_info_panel_width"
|
||||
android:layout_height="@dimen/bus_p_route_line_map_view_height"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -95,12 +95,6 @@ class DriverMonitorView :
|
||||
sopShowDriverMap["20211112X2RI32A"] = "F803EB2046PZD00274"//京A40776D
|
||||
sopShowDriverMap["202204085X310A1"] = "F803EB2046PZD00263"//湘D09005D
|
||||
|
||||
Logger.d(TAG, "getServerToken = ${CallerTelematicManager.getServerToken()}")
|
||||
|
||||
liveListener?.showOrHideLiveBtn(
|
||||
sopShowDriverMap.containsKey(CallerTelematicManager.getServerToken())
|
||||
)
|
||||
|
||||
// TODO SOP演示需求,只有乘客屏幕才会触发这个逻辑 END
|
||||
// 点击重新连接直播
|
||||
ivNormal.setOnClickListener {
|
||||
@@ -110,6 +104,9 @@ class DriverMonitorView :
|
||||
mHandler.postDelayed(mRunnable, 1000) // 1 second delay
|
||||
}
|
||||
|
||||
fun isSOPDriverSn(sn: String) :Boolean{
|
||||
return sopShowDriverMap.containsKey(sn)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
@@ -213,7 +210,6 @@ class DriverMonitorView :
|
||||
|
||||
interface LiveListener {
|
||||
fun onPlayError()
|
||||
fun showOrHideLiveBtn(isShow: Boolean)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -140,8 +140,6 @@ class SmallMapView @JvmOverloads constructor(
|
||||
|
||||
@UiThread
|
||||
fun clearPolyline() {
|
||||
CallerLogger.d(
|
||||
SceneConstant.M_MAP + TAG, "SmallMapView clearPolyline mPolyline -----> ")
|
||||
if (mPolyline != null) {
|
||||
mPolyline!!.remove()
|
||||
mPolyline = null
|
||||
@@ -325,8 +323,6 @@ class SmallMapView @JvmOverloads constructor(
|
||||
val tempStatus = autoPilotStatusInfo.pilotmode
|
||||
if (tempStatus != 1) {
|
||||
UiThreadHandler.post {
|
||||
CallerLogger.d(
|
||||
SceneConstant.M_MAP + TAG, "onAutopilotStatusResponse tempStatus = $tempStatus ---clearPolyline() ")
|
||||
clearPolyline()
|
||||
}
|
||||
} else if (tempStatus == 1 && autoPilotStatus == 0) {
|
||||
|
||||
@@ -147,7 +147,7 @@ public class AMapWrapper implements IMogoMap {
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(batchMarkerOptions);
|
||||
}
|
||||
|
||||
BatchMarkerOptions aiBatchMarkerOptions = new BatchMarkerOptions();
|
||||
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
@@ -169,13 +169,14 @@ public class AMapWrapper implements IMogoMap {
|
||||
return;
|
||||
}
|
||||
long time = markerOptionsArrayList.get(0).getTime();
|
||||
BatchMarkerOptions aiBatchMarkerOptions = new BatchMarkerOptions();
|
||||
// 最后一个参数,是否管理锚点的删除
|
||||
aiBatchMarkerOptions.list = markerOptionsArrayList;
|
||||
aiBatchMarkerOptions.delayStrategy = false;
|
||||
aiBatchMarkerOptions.ruleAngle = FunctionBuildConfig.isBeautyMode ? 8.0f : 0f;
|
||||
aiBatchMarkerOptions.controlIcon = 1;
|
||||
aiBatchMarkerOptions.duration = (int) time;
|
||||
aiBatchMarkerOptions.deleteRule = 1;
|
||||
aiBatchMarkerOptions.deleteRule = 0;
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(aiBatchMarkerOptions);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user