Merge branch 'dev_robotaxi-d-app-module_290_220715_2.9.0' into 'test_robotaxi-d-app-module_290_220715_2.9.0.1'
Dev robotaxi d app module 290 220715 2.9.0 See merge request zhjt/AndroidApp/MoGoEagleEye!101
This commit is contained in:
@@ -137,7 +137,8 @@ public class BaseBusPassengerPresenter extends Presenter<BusPassengerRouteFragme
|
||||
|
||||
@Override
|
||||
public void routeResult(List<LatLng> models, int haveArrivedIndex) {
|
||||
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "routeResult:" + models.size());
|
||||
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "routeResult:" + models.size()
|
||||
+ " haveArrivedIndex = "+haveArrivedIndex);
|
||||
mView.routeResult(models,haveArrivedIndex);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.och.bus.passenger.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -71,6 +70,8 @@ public class BusPassengerMapDirectionView
|
||||
private List<Marker> mLineMarkers = new ArrayList<>();
|
||||
|
||||
private IBusPassengerMapViewCallback mIBusPassengerMapViewCallback;
|
||||
private BitmapDescriptor mArrivedRes;
|
||||
private BitmapDescriptor mUnArrivedRes;
|
||||
|
||||
public BusPassengerMapDirectionView(Context context) {
|
||||
this(context, null);
|
||||
@@ -133,6 +134,9 @@ public class BusPassengerMapDirectionView
|
||||
mEndMarker = mAMap.addMarker(new MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_end_point)));
|
||||
|
||||
mArrivedRes = BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_arrow_arrived);
|
||||
mUnArrivedRes = BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_arrow_un_arrive);
|
||||
|
||||
// 加载自定义样式
|
||||
CustomMapStyleOptions customMapStyleOptions = new CustomMapStyleOptions()
|
||||
.setEnable(true)
|
||||
@@ -182,12 +186,12 @@ public class BusPassengerMapDirectionView
|
||||
if (location == null) {
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "onCarLocationChanged2 :" + location.getLatitude() + ":" + location.getLongitude());
|
||||
// CallerLogger.INSTANCE.d(M_BUS_P + TAG, "onCarLocationChanged2 :" + location.getLatitude() + ":" + location.getLongitude());
|
||||
LatLng currentLatLng = new LatLng(location.getLatitude(), location.getLongitude());
|
||||
|
||||
//更新车辆位置
|
||||
if (mCarMarker != null) {
|
||||
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "location.getBearing() = " + location.getBearing());
|
||||
// CallerLogger.INSTANCE.d(M_BUS_P + TAG, "location.getBearing() = " + location.getBearing());
|
||||
mCarMarker.setRotateAngle(360 - location.getBearing());
|
||||
mCarMarker.setPosition(currentLatLng);
|
||||
mCarMarker.setToTop();
|
||||
@@ -221,13 +225,15 @@ public class BusPassengerMapDirectionView
|
||||
}
|
||||
if (mAMap != null) {
|
||||
|
||||
addRouteColorList();
|
||||
|
||||
if (mCoordinatesLatLng.size() > 2) {
|
||||
|
||||
//设置线段纹理
|
||||
PolylineOptions polylineOptions = new PolylineOptions();
|
||||
polylineOptions.addAll(mCoordinatesLatLng);
|
||||
polylineOptions.useGradient(true);
|
||||
polylineOptions.width(10); //线段宽度
|
||||
polylineOptions.width(14); //线段宽度
|
||||
polylineOptions.setUseTexture(true);
|
||||
polylineOptions.lineCapType(PolylineOptions.LineCapType.LineCapRound);
|
||||
polylineOptions.setCustomTextureList(textureList);
|
||||
polylineOptions.setCustomTextureIndex(texIndexList);
|
||||
@@ -249,9 +255,9 @@ public class BusPassengerMapDirectionView
|
||||
texIndexList.clear();
|
||||
for (int i = 0; i < mCoordinatesLatLng.size(); i++){
|
||||
if (i <= mHaveArrivedIndex){
|
||||
textureList.add(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_arrow_arrived));
|
||||
textureList.add(mArrivedRes);
|
||||
}else {
|
||||
textureList.add(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_arrow_un_arrive));
|
||||
textureList.add(mUnArrivedRes);
|
||||
}
|
||||
texIndexList.add(i);
|
||||
}
|
||||
@@ -330,7 +336,6 @@ public class BusPassengerMapDirectionView
|
||||
mCoordinatesLatLng.clear();
|
||||
mCoordinatesLatLng.addAll(latLngs);
|
||||
mHaveArrivedIndex = haveArrivedIndex;
|
||||
addRouteColorList();
|
||||
}
|
||||
|
||||
public void clearLineMarkers(){
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<shape android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:endColor="#F2F7FF"
|
||||
android:startColor="#E6ECF9"
|
||||
android:endColor="#F2F6FF"
|
||||
android:startColor="#E1E7F5"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_56"
|
||||
android:layout_marginTop="@dimen/dp_28"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:text="@string/bus_p_cur_station_title"
|
||||
android:textColor="@color/bus_p_panel_cur_txt_color"
|
||||
@@ -65,7 +65,7 @@
|
||||
android:id="@+id/bus_p_cur_station_name"
|
||||
android:layout_width="@dimen/bus_p_curent_station_txt_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<com.mogo.och.common.module.wigets.OCHBorderShadowLayout
|
||||
android:id="@+id/edge_view"
|
||||
android:layout_width="716px"
|
||||
android:layout_width="720px"
|
||||
android:layout_height="match_parent"
|
||||
app:shadowColor="@color/bus_p_route_view_left_edge_shadow"
|
||||
app:xOffset="0px"
|
||||
|
||||
@@ -194,7 +194,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单轮询
|
||||
* 订单轮询 初始化主Fragment的Presenter init 调用
|
||||
*/
|
||||
public void startOrStopOrderLoop(){
|
||||
if (NetworkUtils.isConnected(mContext)) {
|
||||
@@ -202,6 +202,9 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭订单轮训 页面摧毁时
|
||||
*/
|
||||
public void release() {
|
||||
startOrStopOrderLoop(false);
|
||||
startOrStopQueryOrderRemaining(false);
|
||||
@@ -255,6 +258,11 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
CallLimitingVelocityListenerManager.INSTANCE.removeListener(limitingVelocityListener);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单轮训
|
||||
* @param start true 开启订单轮训
|
||||
* false 关闭订单轮训
|
||||
*/
|
||||
private void startOrStopOrderLoop(boolean start) {
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "startOrStopOrderLoop() " + start);
|
||||
if (start) {
|
||||
@@ -671,6 +679,9 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单剩余里程和时间
|
||||
*/
|
||||
public void queryOrderRemaining(){
|
||||
if (mCurrentOCHOrder == null) return;
|
||||
TaxiPassengerServiceManager.getInstance().queryOrderRemaining(mContext, mCurrentOCHOrder.orderNo, new TaxiPassengerServiceCallback<TaxiPassengerOrderQueryRemainingResp>() {
|
||||
|
||||
@@ -126,7 +126,9 @@ public class TaxiPassengerModelLoopManager {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 轮训查下 查询订单剩余里程和时间
|
||||
*/
|
||||
public void startQueryOrderRemainingtLoop() {
|
||||
if (mQueryOrderRemainingDisposable != null && !mQueryOrderRemainingDisposable.isDisposed()) {
|
||||
return;
|
||||
|
||||
@@ -119,7 +119,8 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged(Location location) {
|
||||
LeftMenuOpen.INSTANCE.callCallBack(-1,-1,location.getSpeed());
|
||||
// 速度不用展示
|
||||
// LeftMenuOpen.INSTANCE.callCallBack(-1,-1,location.getSpeed());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -77,7 +77,8 @@ public class TaxiPassengerServingOrderPresenter extends Presenter<TaxiPassengerS
|
||||
@Override
|
||||
public void routeResultByServer(List<LatLng> models, int haveArrivedIndex) {
|
||||
if (models == null) return;
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "routeResultByServer:" + models.size());
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "routeResultByServer:" + models.size()
|
||||
+ " haveArrivedIndex = " + haveArrivedIndex);
|
||||
mView.routeResultByServer(models,haveArrivedIndex);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,9 @@ public class TaxiPassengerMapDirectionView
|
||||
List<BitmapDescriptor> textureList = new ArrayList<>();
|
||||
List<Integer> texIndexList = new ArrayList<>();
|
||||
|
||||
private BitmapDescriptor mArrivedRes;
|
||||
private BitmapDescriptor mUnArrivedRes;
|
||||
|
||||
private ITaxiPassengerMapViewCallback mITaxiPassengerMapViewCallback;
|
||||
|
||||
public TaxiPassengerMapDirectionView(Context context) {
|
||||
@@ -129,6 +132,9 @@ public class TaxiPassengerMapDirectionView
|
||||
mEndMarker = mAMap.addMarker(new MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.drawable.taxi_p_map_view_dir_end)));
|
||||
|
||||
mArrivedRes = BitmapDescriptorFactory.fromResource(R.drawable.taxi_p_map_arrow_arrived);
|
||||
mUnArrivedRes = BitmapDescriptorFactory.fromResource(R.drawable.taxi_p_map_arrow_un_arrive);
|
||||
|
||||
// 加载自定义样式
|
||||
CustomMapStyleOptions customMapStyleOptions = new CustomMapStyleOptions()
|
||||
.setEnable(true)
|
||||
@@ -189,7 +195,7 @@ public class TaxiPassengerMapDirectionView
|
||||
boundsBuilder.include(endLatLng);
|
||||
//第二个参数为四周留空宽度
|
||||
mAMap.moveCamera(CameraUpdateFactory.newLatLngBoundsRect(boundsBuilder.build(), 100,100,100,100));
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "onCarLocationChanged2--moveCamera :" + location.getLatitude()+", "+location.getLongitude());
|
||||
// CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "onCarLocationChanged2--moveCamera :" + location.getLatitude()+", "+location.getLongitude());
|
||||
|
||||
} else {
|
||||
//设置希望展示的地图缩放级别
|
||||
@@ -234,15 +240,13 @@ public class TaxiPassengerMapDirectionView
|
||||
}
|
||||
if (mAMap != null) {
|
||||
|
||||
// addRouteColorList();
|
||||
addRouteColorList();
|
||||
|
||||
if (mCoordinatesLatLng.size() > 2) {
|
||||
//设置线段纹理
|
||||
PolylineOptions polylineOptions = new PolylineOptions();
|
||||
polylineOptions.addAll(mCoordinatesLatLng);
|
||||
//polylineOptions.colorValues(colorList); // 1FC3FF -> 57ABFF
|
||||
//加上这个属性,表示使用渐变线
|
||||
//polylineOptions.useGradient(true);
|
||||
polylineOptions.setUseTexture(true);
|
||||
polylineOptions.width(15);
|
||||
polylineOptions.lineCapType(PolylineOptions.LineCapType.LineCapRound);
|
||||
polylineOptions.setCustomTextureList(textureList);
|
||||
@@ -263,15 +267,10 @@ public class TaxiPassengerMapDirectionView
|
||||
textureList.clear();
|
||||
texIndexList.clear();
|
||||
for (int i = 0; i < mCoordinatesLatLng.size(); i++){
|
||||
// if (i <= mCoordinatesLatLng.size()/2){
|
||||
// colorList.add(Color.argb(255, 31, 195, 255));//start
|
||||
// }else {
|
||||
// colorList.add(Color.argb(255, 87, 171, 255));//end
|
||||
// }
|
||||
if (i <= mHaveArrivedIndex){
|
||||
textureList.add(BitmapDescriptorFactory.fromResource(R.drawable.taxi_p_map_arrow_arrived));
|
||||
textureList.add(mArrivedRes);
|
||||
}else {
|
||||
textureList.add(BitmapDescriptorFactory.fromResource(R.drawable.taxi_p_map_arrow_un_arrive));
|
||||
textureList.add(mUnArrivedRes);
|
||||
}
|
||||
texIndexList.add(i);
|
||||
}
|
||||
@@ -360,7 +359,6 @@ public class TaxiPassengerMapDirectionView
|
||||
mCoordinatesLatLng.clear();
|
||||
mCoordinatesLatLng.addAll(latLngs);
|
||||
mHaveArrivedIndex = haveArrivedIndex;
|
||||
addRouteColorList();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,6 +17,9 @@ import com.mogo.och.taxi.passenger.mulprocess.BinderCursor
|
||||
import com.mogo.och.taxi.passenger.mulprocess.BinderProvider
|
||||
import com.mogo.och.taxi.passenger.mulprocess.ICallback
|
||||
import com.mogo.och.taxi.passenger.mulprocess.ILeftMenuService
|
||||
import rx.Observable
|
||||
import rx.Observer
|
||||
import rx.schedulers.Schedulers
|
||||
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
@@ -38,6 +41,11 @@ object LeftMenuOpen {
|
||||
|
||||
private var icallbacks: RemoteCallbackList<ICallback> = RemoteCallbackList<ICallback>()
|
||||
|
||||
var checkIndex = OverlayLeftViewUtils.LIVE
|
||||
private var lastClickTime = 0L
|
||||
private const val FAST_CLICK_DELAY_TIME = 1000 // 防止事件发送过快
|
||||
|
||||
|
||||
fun setValue(
|
||||
windowView: View,
|
||||
wl: WindowManager.LayoutParams?,
|
||||
@@ -70,7 +78,8 @@ object LeftMenuOpen {
|
||||
val iterator = dragList.iterator()
|
||||
while (iterator.hasNext()) {
|
||||
val next = iterator.next()
|
||||
unRegisterDragView(next)
|
||||
unRegisterDragView(next,false)
|
||||
iterator.remove()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,8 +178,10 @@ object LeftMenuOpen {
|
||||
}
|
||||
}
|
||||
|
||||
fun unRegisterDragView(view: View?) {
|
||||
dragList.remove(view)
|
||||
fun unRegisterDragView(view: View?,remove:Boolean) {
|
||||
if(remove) {
|
||||
dragList.remove(view)
|
||||
}
|
||||
view?.let {
|
||||
it.setOnTouchListener(null)
|
||||
it.setOnClickListener(null)
|
||||
@@ -220,15 +231,29 @@ object LeftMenuOpen {
|
||||
}
|
||||
|
||||
fun callCallBack(meters: Long,timeInSecond: Long,speed:Float){
|
||||
val len = icallbacks.beginBroadcast()
|
||||
for (i in 0 until len) {
|
||||
try {
|
||||
icallbacks.getBroadcastItem(i).onResult(meters,timeInSecond,speed)
|
||||
} catch (e: RemoteException) {
|
||||
e.printStackTrace()
|
||||
if(checkIndex == OverlayLeftViewUtils.CONSULT||checkIndex == OverlayLeftViewUtils.MOVIE) {
|
||||
if (System.currentTimeMillis() - lastClickTime < FAST_CLICK_DELAY_TIME){
|
||||
return
|
||||
}
|
||||
lastClickTime = System.currentTimeMillis()
|
||||
|
||||
Observable.empty<String?>().subscribeOn(Schedulers.io())
|
||||
.subscribe(object : Observer<String?> {
|
||||
override fun onCompleted() {
|
||||
val len = icallbacks.beginBroadcast()
|
||||
for (i in 0 until len) {
|
||||
try {
|
||||
icallbacks.getBroadcastItem(i).onResult(meters, timeInSecond, speed)
|
||||
} catch (e: RemoteException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
icallbacks.finishBroadcast()
|
||||
}
|
||||
override fun onError(e: Throwable?) {}
|
||||
override fun onNext(t: String?) {}
|
||||
})
|
||||
}
|
||||
icallbacks.finishBroadcast()
|
||||
}
|
||||
|
||||
fun invoKeyByEventType(typeID:Int){
|
||||
|
||||
@@ -105,6 +105,7 @@ object OverlayLeftViewUtils {
|
||||
|
||||
val liveSelected = object :ListAdapter.OnTabSelectListener{
|
||||
override fun onSelect(isCurrentProcess:Boolean) {
|
||||
LeftMenuOpen.checkIndex = LIVE
|
||||
if(isCurrentProcess) {
|
||||
close(view, windowManager)
|
||||
}else {
|
||||
@@ -124,6 +125,7 @@ object OverlayLeftViewUtils {
|
||||
|
||||
val overViewSelected = object :ListAdapter.OnTabSelectListener{
|
||||
override fun onSelect(isCurrentProcess:Boolean) {
|
||||
LeftMenuOpen.checkIndex = OVERVIEW
|
||||
if(isCurrentProcess) {
|
||||
close(view, windowManager)
|
||||
}else {
|
||||
@@ -143,6 +145,7 @@ object OverlayLeftViewUtils {
|
||||
|
||||
val consultSelect = object :ListAdapter.OnTabSelectListener{
|
||||
override fun onSelect(isCurrentProcess:Boolean) {
|
||||
LeftMenuOpen.checkIndex = CONSULT
|
||||
if(isCurrentProcess) {
|
||||
close(view, windowManager)
|
||||
//计算订单起点和终点距离
|
||||
@@ -154,6 +157,7 @@ object OverlayLeftViewUtils {
|
||||
|
||||
val entertainmentSelect = object :ListAdapter.OnTabSelectListener{
|
||||
override fun onSelect(isCurrentProcess:Boolean) {
|
||||
LeftMenuOpen.checkIndex = MOVIE
|
||||
if(isCurrentProcess) {
|
||||
close(view, windowManager)
|
||||
val sumDis = SharedPrefsMgr.getInstance(context).getInt(TaxiPassengerConst.SP_KEY_ORDER_SUM_DIS, 0)
|
||||
@@ -178,6 +182,9 @@ object OverlayLeftViewUtils {
|
||||
windowManager!!.addView(overlayView, params)
|
||||
checkProcess()
|
||||
isShowing = true
|
||||
} catch (e: WindowManager.BadTokenException) {
|
||||
isShowing = true;
|
||||
dismissOverlayView(false)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
@@ -260,7 +267,7 @@ object OverlayLeftViewUtils {
|
||||
}
|
||||
|
||||
fun removeDragTarget(view: View?){
|
||||
LeftMenuOpen.unRegisterDragView(view)
|
||||
LeftMenuOpen.unRegisterDragView(view,true)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -365,6 +372,10 @@ object OverlayLeftViewUtils {
|
||||
}
|
||||
}
|
||||
|
||||
fun getStatus():Boolean{
|
||||
return isShowing
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除覆盖View在Activity上面
|
||||
*/
|
||||
@@ -387,7 +398,12 @@ object OverlayLeftViewUtils {
|
||||
try {
|
||||
if (windowManager != null && overlayView != null) {
|
||||
windowManager!!.removeViewImmediate(overlayView)
|
||||
params = null
|
||||
}
|
||||
if(windowManager!=null){
|
||||
windowManager = null
|
||||
}
|
||||
if(params!=null){
|
||||
params = null
|
||||
}
|
||||
if (overlayView!=null) {
|
||||
|
||||
@@ -16,10 +16,10 @@ import com.mogo.och.common.module.utils.NumberFormatUtil
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerVideoPlay
|
||||
import com.mogo.och.taxi.passenger.constant.TaxiPassengerConst
|
||||
import com.mogo.och.taxi.passenger.event.FinishActivity
|
||||
import com.mogo.och.taxi.passenger.mulprocess.ICallback
|
||||
import com.mogo.och.taxi.passenger.ui.leftmenu.LeftMenuOpen
|
||||
import com.mogo.och.taxi.passenger.ui.leftmenu.OverlayLeftViewUtils
|
||||
import com.mogo.och.taxi.passenger.event.FinishActivity
|
||||
import com.mogo.och.taxi.passenger.ui.video.layoutmanage.CarouselLayoutManager
|
||||
import com.mogo.och.taxi.passenger.ui.video.layoutmanage.CarouselZoomPostLayoutListener
|
||||
import com.mogo.och.taxi.passenger.ui.video.layoutmanage.CenterScrollListener
|
||||
@@ -33,7 +33,14 @@ import com.shuyu.gsyvideoplayer.video.base.GSYVideoView
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
import java.util.*
|
||||
import rx.Observable
|
||||
import rx.Observer
|
||||
import rx.Subscription
|
||||
import rx.android.schedulers.AndroidSchedulers
|
||||
import rx.schedulers.Schedulers
|
||||
import java.util.Calendar
|
||||
import java.util.concurrent.TimeUnit
|
||||
import kotlin.collections.ArrayList
|
||||
import kotlin.math.floor
|
||||
|
||||
|
||||
@@ -44,6 +51,7 @@ class VideoActivity : AppCompatActivity() {
|
||||
private lateinit var clContain: ConstraintLayout
|
||||
private lateinit var acivTitleIcon: AppCompatImageView
|
||||
private lateinit var tvTitle: TextView
|
||||
private var subscribe: Subscription?=null
|
||||
|
||||
private val arrayListOf = ArrayList<TaxiPassengerVideoPlay>()
|
||||
|
||||
@@ -297,7 +305,7 @@ class VideoActivity : AppCompatActivity() {
|
||||
acivTitleIcon = findViewById(R.id.aciv_title_icon)
|
||||
tvTitle = findViewById(R.id.tv_mogo_consult)
|
||||
acivTitleIcon.setOnClickListener {
|
||||
finish()
|
||||
//finish()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,7 +352,25 @@ class VideoActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
subscribe = Observable.interval(0, 8, TimeUnit.SECONDS)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(object : Observer<Long> {
|
||||
override fun onCompleted() {}
|
||||
override fun onError(e: Throwable?) {}
|
||||
override fun onNext(t: Long?) {
|
||||
if (!OverlayLeftViewUtils.getStatus()) {
|
||||
when (videotype){
|
||||
VIDEOTYPE_CONSULT -> {
|
||||
OverlayLeftViewUtils.showOverlayView(this@VideoActivity,isOpen = false, checkIndex = OverlayLeftViewUtils.CONSULT)
|
||||
}
|
||||
VIDEOTYPE_MOIES -> {
|
||||
OverlayLeftViewUtils.showOverlayView(this@VideoActivity,isOpen = false, checkIndex = OverlayLeftViewUtils.MOVIE)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
@@ -361,6 +387,11 @@ class VideoActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
}
|
||||
subscribe?.let {
|
||||
if(it.isUnsubscribed){
|
||||
it.unsubscribe()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneTAG
|
||||
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.BadCaseManager
|
||||
import com.zhjt.mogo_core_function_devatools.feedback.FeedbackManager
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchManager
|
||||
import com.zhjt.mogo_core_function_devatools.scene.SceneManager.Companion.sceneManager
|
||||
import com.zhjt.mogo_core_function_devatools.status.*
|
||||
@@ -103,8 +102,8 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
upgradeManager.downLoadPackage(mContext!!, downloadKey,downloadUrl)
|
||||
}
|
||||
|
||||
override fun showStatusBar(ctx: Context) {
|
||||
StatusManager.init(ctx)
|
||||
override fun showStatusBar(ctx: Context, anchor: View) {
|
||||
StatusManager.init(ctx, anchor)
|
||||
StatusManager.show()
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ fun Context.enqueuePop(content: View, width: Int, height: Int, key: String = "",
|
||||
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
fun Context.normalPop(content: View, width: Int, height: Int, startX: Int = 0, startY: Int = 0, gravity: Int = Gravity.START, onOuterViewClicked:((focus: View) -> Unit)? = null, isFocusable: Boolean = true): () -> Unit {
|
||||
fun Context.normalPop(content: View, width: Int, height: Int, startX: Int = 0, startY: Int = 0, gravity: Int = Gravity.START, onOuterViewClicked:((focus: View) -> Unit)? = null, isFocusable: Boolean = true): PopupWindow? {
|
||||
val activity = (this as? FragmentActivity) ?: throw IllegalStateException("please use Activity to trigger pop show.")
|
||||
val isImmersiveMode = BarUtils.isImmersiveMode(activity)
|
||||
var tempPop: PopupWindow? = null
|
||||
@@ -192,7 +192,7 @@ fun Context.normalPop(content: View, width: Int, height: Int, startX: Int = 0, s
|
||||
it.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||
}
|
||||
if (VERSION.SDK_INT >= VERSION_CODES.M) {
|
||||
val transition = Slide(gravity).also {
|
||||
val transition = Slide(if ((gravity and Gravity.START) != 0) Gravity.START else if ((gravity and Gravity.TOP) != 0) Gravity.TOP else if ((gravity and Gravity.END) != 0) Gravity.END else if ((gravity and Gravity.BOTTOM) != 0) Gravity.BOTTOM else throw AssertionError("gravity is not invalid.")).also {
|
||||
it.interpolator = AccelerateDecelerateInterpolator()
|
||||
it.duration = 200
|
||||
}
|
||||
@@ -202,16 +202,14 @@ fun Context.normalPop(content: View, width: Int, height: Int, startX: Int = 0, s
|
||||
pop.contentView = content
|
||||
decorView.doOnAttach {
|
||||
try {
|
||||
pop.showAtLocation(it, gravity, startX, if (isImmersiveMode) 0 else BarUtils.getStatusBarHeight() + startY)
|
||||
pop.showAtLocation(it, gravity, startX, (if (isImmersiveMode) 0 else BarUtils.getStatusBarHeight()) + startY)
|
||||
tempPop = pop
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
tempPop?.takeIf { it.isShowing }?.dismiss()
|
||||
}
|
||||
return tempPop
|
||||
}
|
||||
|
||||
fun isVisibleOnPoint(content: View, x: Int, y: Int): Boolean {
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.Scene.Companion.scene
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_CHAT
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
@@ -28,6 +29,7 @@ class SceneManager {
|
||||
companion object {
|
||||
|
||||
private const val ADAS = "ADAS"
|
||||
private const val CALLCHAT = "CALLCHAT"
|
||||
private const val DEVA = "DEVA"
|
||||
private const val HMI = "HMI"
|
||||
private const val OBU = "OBU"
|
||||
@@ -51,6 +53,7 @@ class SceneManager {
|
||||
init {
|
||||
//过滤所需条件
|
||||
sceneModuleTAG.map[ADAS] = SceneModule(true, M_ADAS_IMPL)
|
||||
sceneModuleTAG.map[CALLCHAT] = SceneModule(false, M_CHAT)
|
||||
sceneModuleTAG.map[DEVA] = SceneModule(false, M_DEVA)
|
||||
sceneModuleTAG.map[HMI] = SceneModule(false, M_HMI)
|
||||
sceneModuleTAG.map[OBU] = SceneModule(false, M_OBU)
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.zhjt.mogo_core_function_devatools.status
|
||||
import android.content.*
|
||||
import android.view.*
|
||||
import android.view.WindowManager.LayoutParams
|
||||
import android.widget.*
|
||||
import androidx.core.view.*
|
||||
import androidx.lifecycle.*
|
||||
import androidx.lifecycle.Lifecycle.Event
|
||||
@@ -11,8 +12,7 @@ import androidx.lifecycle.Lifecycle.Event.ON_DESTROY
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.util.AppStateManager
|
||||
import com.mogo.eagle.core.utilcode.util.IAppStateListener
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.zhjt.mogo_core_function_devatools.ext.*
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.CanStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.GpsStatus
|
||||
@@ -41,14 +41,19 @@ object StatusManager {
|
||||
|
||||
private lateinit var model: StatusModel
|
||||
|
||||
private var hidePop: (() -> Unit)? = null
|
||||
private var pop: PopupWindow? = null
|
||||
|
||||
private var timer: Job? = null
|
||||
|
||||
private var context: WeakReference<Context>? = null
|
||||
|
||||
private var anchor: WeakReference<View>? = null
|
||||
|
||||
private var hasInit = false
|
||||
|
||||
private var oldX = 0
|
||||
private var oldY = 0
|
||||
|
||||
private val listener = object : IMoGoAutopilotStatusListener {
|
||||
override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
|
||||
super.onAutopilotGuardian(guardianInfo)
|
||||
@@ -88,7 +93,7 @@ object StatusManager {
|
||||
}
|
||||
}
|
||||
|
||||
fun init(ctx: Context) {
|
||||
fun init(ctx: Context, anchor: View) {
|
||||
if (hasInit) {
|
||||
return
|
||||
}
|
||||
@@ -106,6 +111,25 @@ object StatusManager {
|
||||
}
|
||||
})
|
||||
context = WeakReference(ctx)
|
||||
anchor.viewTreeObserver.addOnGlobalLayoutListener {
|
||||
anchor.getLocationInWindow(IntArray(2).also {
|
||||
val currentX = it[0]
|
||||
val currentY = it[1]
|
||||
var changed = false
|
||||
if (oldX != currentX) {
|
||||
oldX = currentX
|
||||
changed = true
|
||||
}
|
||||
if (oldY != currentY) {
|
||||
changed = true
|
||||
oldY = currentY
|
||||
}
|
||||
if (changed && pop?.isShowing == true) {
|
||||
pop?.update(getOffsetX(currentX), currentY + 130.PX, -1, -1)
|
||||
}
|
||||
})
|
||||
}
|
||||
this.anchor = WeakReference(anchor)
|
||||
}
|
||||
|
||||
private fun onCreate(ctx: Context) {
|
||||
@@ -133,20 +157,29 @@ object StatusManager {
|
||||
}
|
||||
|
||||
fun show() {
|
||||
val anchor = this.anchor?.get() ?: return
|
||||
context?.get()?.also { ctx ->
|
||||
hidePop?.invoke()
|
||||
pop?.takeIf { it.isShowing }?.dismiss()
|
||||
val content = StatusView(model, ctx)
|
||||
content.doOnAttach {
|
||||
for (f in flows) {
|
||||
f.onCreate()
|
||||
}
|
||||
}
|
||||
ctx.normalPop(content, width = 665.PX, height = LayoutParams.WRAP_CONTENT, gravity = Gravity.END, startX = 55.PX, isFocusable = false).also { hidePop = it }
|
||||
val out = IntArray(2)
|
||||
anchor.getLocationInWindow(out)
|
||||
ctx.normalPop(content, width = LayoutParams.WRAP_CONTENT, height = LayoutParams.WRAP_CONTENT, gravity = Gravity.END or Gravity.TOP, startX = getOffsetX(out[0]), startY = out[1] + 130.PX , isFocusable = false)?.also {
|
||||
pop = it
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getOffsetX(anchorX: Int): Int {
|
||||
return ScreenUtils.getScreenWidth() - anchorX + 40.PX
|
||||
}
|
||||
|
||||
fun hide() {
|
||||
hidePop?.invoke()
|
||||
pop?.takeIf { it.isShowing }?.dismiss()
|
||||
}
|
||||
|
||||
private fun onDestroy(ctx: Context) {
|
||||
@@ -158,6 +191,6 @@ object StatusManager {
|
||||
it.onDestroy()
|
||||
}
|
||||
flows.clear()
|
||||
hidePop?.invoke()
|
||||
pop?.takeIf { it.isShowing }?.dismiss()
|
||||
}
|
||||
}
|
||||
@@ -59,15 +59,14 @@ internal class StatusView(private val model: StatusModel, ctx: Context): Constra
|
||||
moveDuration = 0
|
||||
removeDuration = 0
|
||||
}
|
||||
itx.layoutManager = GridLayoutManager(context, 3, GridLayoutManager.VERTICAL, false)
|
||||
itx.layoutManager = LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false)
|
||||
itx.background = shape(solid = Color.parseColor("#80000000"), radius = 40.PX)
|
||||
itx.addItemDecoration(
|
||||
CommonDividerItemDecoration.Builder()
|
||||
.horizontalExternalSpace(66.PX)
|
||||
.verticalExternalSpace(60.PX)
|
||||
.spanCountTBCare(false)
|
||||
.verticalInnerSpace(50.PX)
|
||||
.horizontalInnerSpace(116.PX)
|
||||
.horizontalExternalSpace(38.PX)
|
||||
.verticalExternalSpace(30.PX)
|
||||
.spanCountLRCare(false)
|
||||
.horizontalInnerSpace(50.PX)
|
||||
.build()
|
||||
)
|
||||
val adapter = model.status.value?.let { data -> StatusAdapter(context, data.second) }?.also { adapter -> itx.adapter = adapter }
|
||||
@@ -92,7 +91,6 @@ internal class StatusView(private val model: StatusModel, ctx: Context): Constra
|
||||
}
|
||||
|
||||
private fun animate(expand: Boolean) {
|
||||
iv.animate().rotation(if (expand) 0f else -180f).setDuration(200).start()
|
||||
TransitionManager.beginDelayedTransition(this, AutoTransition().setDuration(200))
|
||||
rv.visibility = if (expand) View.VISIBLE else View.INVISIBLE
|
||||
}
|
||||
|
||||
@@ -5,7 +5,10 @@ import android.view.*
|
||||
import android.widget.*
|
||||
import androidx.core.content.*
|
||||
import androidx.recyclerview.widget.*
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.zhjt.mogo_core_function_devatools.*
|
||||
import com.zhjt.mogo_core_function_devatools.R
|
||||
import com.zhjt.mogo_core_function_devatools.R.drawable
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.*
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.IpcStatus
|
||||
@@ -30,11 +33,10 @@ internal class StatusAdapter(val ctx: Context, var data: ArrayList<Status>): Rec
|
||||
itemView.findViewById(R.id.iv)
|
||||
}
|
||||
|
||||
private val tv: TextView by lazy {
|
||||
itemView.findViewById(R.id.tv)
|
||||
}
|
||||
|
||||
fun bind(status: Status) {
|
||||
itemView.onClick {
|
||||
ToastUtils.showShort(getText(status))
|
||||
}
|
||||
when(status) {
|
||||
is IpcStatus -> {
|
||||
if (status.enabled) {
|
||||
@@ -42,7 +44,6 @@ internal class StatusAdapter(val ctx: Context, var data: ArrayList<Status>): Rec
|
||||
} else {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_ipc_disable)
|
||||
}
|
||||
tv.text = "工控机"
|
||||
}
|
||||
is CanStatus -> {
|
||||
if (status.enabled) {
|
||||
@@ -50,15 +51,12 @@ internal class StatusAdapter(val ctx: Context, var data: ArrayList<Status>): Rec
|
||||
} else {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_can_disable)
|
||||
}
|
||||
tv.text = "CAN"
|
||||
}
|
||||
is NetStatus -> {
|
||||
if (status.enabled) {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_net_enable)
|
||||
tv.text = status.name ?: "WI-FI"
|
||||
} else {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_net_disable)
|
||||
tv.text = "WI-FI"
|
||||
}
|
||||
}
|
||||
is GpsStatus -> {
|
||||
@@ -67,21 +65,17 @@ internal class StatusAdapter(val ctx: Context, var data: ArrayList<Status>): Rec
|
||||
} else {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_gps_disable)
|
||||
}
|
||||
tv.text = "GPS"
|
||||
}
|
||||
is TracingStatus -> {
|
||||
when(status.state) {
|
||||
ROUTE_FAILED, TRACK_LOAD_FAIL, TRACK_NOT_EXIST, TRACK_FINDED, UNKNOWN -> {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_trace_unkown)
|
||||
tv.text = "未知"
|
||||
}
|
||||
TRACK_LOADED -> {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_track_enable)
|
||||
tv.text = "T"
|
||||
}
|
||||
ROUTE_LOADED -> {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_route_enable)
|
||||
tv.text = "V"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,9 +85,17 @@ internal class StatusAdapter(val ctx: Context, var data: ArrayList<Status>): Rec
|
||||
} else {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_rtk_disable)
|
||||
}
|
||||
tv.text = status.desc
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getText(status: Status): String = when(status) {
|
||||
is CanStatus -> "CAN:${ if (status.enabled) "状态正常" else "非正常连接" }"
|
||||
is GpsStatus -> "GPS:${ if (status.enabled) "状态正常" else "非正常连接" }"
|
||||
is IpcStatus -> "工控机:${ if (status.enabled) "状态正常" else "非正常连接" }"
|
||||
is NetStatus -> "WIFI:${ if (status.enabled) "${status.name}" else "非正常连接" }"
|
||||
is RTKStatus -> "${status.desc.uppercase()}:${ if (status.enabled) "状态正常" else "非正常连接" }"
|
||||
is TracingStatus -> "轨迹类型:${ if (status.state == TRACK_LOADED) "循迹" else if (status.state == ROUTE_LOADED) "自主算路" else "暂无轨迹" }"
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 12 KiB |
@@ -8,22 +8,24 @@
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="468px"
|
||||
app:layout_constraintBottom_toTopOf="@+id/iv"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="156px"
|
||||
android:minWidth="902px"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintEnd_toStartOf="@+id/iv"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginEnd="20px"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv"
|
||||
android:layout_width="102px"
|
||||
android:layout_height="102px"
|
||||
android:layout_marginTop="30px"
|
||||
android:layout_width="107px"
|
||||
android:layout_height="107px"
|
||||
android:layout_marginBottom="20px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rv"
|
||||
app:layout_constraintStart_toEndOf="@+id/rv"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="@drawable/icon_dev_status_un_fold"/>
|
||||
|
||||
|
||||
@@ -1,22 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="100px"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/iv"
|
||||
android:layout_width="96px"
|
||||
android:layout_height="96px" />
|
||||
<TextView
|
||||
android:id="@+id/tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20px"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="24px" />
|
||||
</LinearLayout>
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/iv"
|
||||
android:layout_width="96px"
|
||||
android:layout_height="96px" />
|
||||
@@ -205,9 +205,8 @@ import java.util.*
|
||||
setProxyTrafficLightView(viewTrafficLightVr)
|
||||
setProxyLimitingSpeedView(viewLimitingVelocity)
|
||||
setViewNotificationProvider(this)
|
||||
|
||||
context?.also {
|
||||
CallerDevaToolsManager.showStatusBar(it)
|
||||
CallerDevaToolsManager.showStatusBar(it, vs_status_bar)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1226,7 +1225,7 @@ import java.util.*
|
||||
}
|
||||
|
||||
override fun hideSmallFragment() {
|
||||
context?.let { CallerDevaToolsManager.showStatusBar(it) }
|
||||
context?.let { CallerDevaToolsManager.showStatusBar(it, vs_status_bar) }
|
||||
val fragmentOverview = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_OVERVIEW)
|
||||
.navigation() as BaseFragment
|
||||
activity?.supportFragmentManager?.beginTransaction()
|
||||
|
||||
@@ -1065,8 +1065,10 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
val name = map.value.name
|
||||
val log = map.value.log
|
||||
when (name) {
|
||||
////ADAS日志标签
|
||||
//ADAS日志标签
|
||||
SceneConstant.M_ADAS_IMPL -> cbAdasLog.isChecked = log
|
||||
//CALLCHAT日志标签
|
||||
SceneConstant.M_CHAT -> cbCallChatLog.isChecked = log
|
||||
//OBU日志标签
|
||||
SceneConstant.M_OBU -> cbObuLog.isChecked = log
|
||||
//HMI日志标签
|
||||
@@ -1151,6 +1153,12 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
sceneMap[SceneConstant.M_ADAS_IMPL] = adasModule
|
||||
CallerDevaToolsManager.updateModuleTAG(sceneMap)
|
||||
}
|
||||
//CALLCHAT日志标签
|
||||
cbCallChatLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
val callChatModule = SceneModule(isChecked, SceneConstant.M_CHAT)
|
||||
sceneMap[SceneConstant.M_CHAT] = callChatModule
|
||||
CallerDevaToolsManager.updateModuleTAG(sceneMap)
|
||||
}
|
||||
//OBU日志标签
|
||||
cbObuLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
val obuModule = SceneModule(isChecked, SceneConstant.M_OBU)
|
||||
|
||||
@@ -10,6 +10,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.ResourcesHelper.getDrawable
|
||||
import java.lang.reflect.Field
|
||||
|
||||
/**
|
||||
@@ -72,11 +73,15 @@ class IPCReportWindow constructor(activity: Activity) : View.OnTouchListener{
|
||||
}
|
||||
//错误列表
|
||||
tvIpcErrorTab.setOnClickListener {
|
||||
tvIpcErrorTab.background = getDrawable(mActivity,R.drawable.ipc_error_tab_normal_bg)
|
||||
tvIpcWarningTab.background = getDrawable(mActivity,R.drawable.ipc_warning_tab_normal_bg)
|
||||
ipcReportAdapter?.setData(ipcErrorReportList)
|
||||
ipcReportAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
//预警列表
|
||||
tvIpcWarningTab.setOnClickListener {
|
||||
tvIpcErrorTab.background = getDrawable(mActivity,R.drawable.ipc_error_tab_select_bg)
|
||||
tvIpcWarningTab.background = getDrawable(mActivity,R.drawable.ipc_warning_tab_select_bg)
|
||||
ipcReportAdapter?.setData(ipcWarningReportList)
|
||||
ipcReportAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#3A57C5"
|
||||
android:endColor="#3A57C5"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:topLeftRadius="40px" />
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#3A57C5"
|
||||
android:endColor="#3A57C5"
|
||||
android:angle="0"
|
||||
/>
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#029DFF"
|
||||
android:endColor="#0056FF"
|
||||
android:angle="0"
|
||||
/>
|
||||
</shape>
|
||||
@@ -112,23 +112,21 @@
|
||||
android:id="@+id/ivBadCaseTools"
|
||||
android:layout_width="120px"
|
||||
android:layout_height="120px"
|
||||
android:src="@drawable/bad_case_selector"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/ivToolsIcon"
|
||||
android:layout_marginStart="50px"
|
||||
android:layout_marginBottom="40px"
|
||||
/>
|
||||
android:src="@drawable/bad_case_selector"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/ivToolsIcon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivAiCollectTools"
|
||||
android:layout_width="120px"
|
||||
android:layout_height="120px"
|
||||
android:src="@drawable/ai_collect_selector"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/ivBadCaseTools"
|
||||
android:layout_marginStart="50px"
|
||||
android:layout_marginBottom="40px"
|
||||
/>
|
||||
android:src="@drawable/ai_collect_selector"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/ivBadCaseTools" />
|
||||
|
||||
<View
|
||||
android:id="@+id/viewUpgradeTips"
|
||||
@@ -186,13 +184,18 @@
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.VersionNameView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="45px"
|
||||
/>
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/vs_status_bar"
|
||||
android:layout_width="107px"
|
||||
android:layout_height="107px"
|
||||
android:layout_marginEnd="30px"
|
||||
app:layout_constraintEnd_toStartOf="@+id/viewLimitingVelocity"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/viewLimitingVelocity"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
|
||||
@@ -1845,6 +1845,14 @@
|
||||
android:checked="false"
|
||||
android:text="ADAS日志" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbCallChatLog"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="CallChat日志" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbObuLog"
|
||||
style="@style/DebugSettingText"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="38px"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/ipc_error_tab_bg"
|
||||
android:background="@drawable/ipc_error_tab_normal_bg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tv_ipc_error_tab"
|
||||
android:background="#3A57C5"
|
||||
android:background="@drawable/ipc_warning_tab_normal_bg"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -68,11 +68,22 @@ class IdentifyOriginDataDrawer : Identify, IMoGoAutopilotStatusListener {
|
||||
val trackId = planningObj.uuid.toString()
|
||||
if (mMarkersCaches.containsKey(trackId)) {
|
||||
val trackObj = mMarkersCaches[trackId]
|
||||
trackObj?.let {
|
||||
colorTrafficData[trackId] = PlanningTrack(
|
||||
"#BCB239FF",
|
||||
CallerAutoPilotStatusListenerManager.getCurWgs84SatelliteTime()
|
||||
)
|
||||
if(planningObj.type == 0){
|
||||
//0是leading障碍物,障碍物车身红色提示
|
||||
trackObj?.let {
|
||||
colorTrafficData[trackId] = PlanningTrack(
|
||||
"#D77F70FF",
|
||||
CallerAutoPilotStatusListenerManager.getCurWgs84SatelliteTime()
|
||||
)
|
||||
}
|
||||
}else if(planningObj.type == 1){
|
||||
//1是避障和择机的障碍物,障碍物车身黄色提示
|
||||
trackObj?.let {
|
||||
colorTrafficData[trackId] = PlanningTrack(
|
||||
"#E4DD94FF",
|
||||
CallerAutoPilotStatusListenerManager.getCurWgs84SatelliteTime()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ interface IDevaToolsProvider : IProvider {
|
||||
/**
|
||||
* 展示状态栏
|
||||
*/
|
||||
fun showStatusBar(ctx: Context)
|
||||
fun showStatusBar(ctx: Context, anchor: View)
|
||||
|
||||
/**
|
||||
* 隐藏状态栏
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.call.devatools
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import android.view.*
|
||||
import com.mogo.eagle.core.data.config.*
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
|
||||
@@ -150,9 +150,18 @@ object CallerDevaToolsManager {
|
||||
/**
|
||||
* 展示状态栏
|
||||
*/
|
||||
fun showStatusBar(ctx: Context) {
|
||||
fun showStatusBar(ctx: Context, anchor: View) {
|
||||
if (!AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
devaToolsProviderApi?.showStatusBar(ctx)
|
||||
if (anchor.isLaidOut) {
|
||||
devaToolsProviderApi?.showStatusBar(ctx, anchor)
|
||||
} else {
|
||||
anchor.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
devaToolsProviderApi?.showStatusBar(ctx, anchor)
|
||||
anchor.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.util.ArrayMap
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_CHAT
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
@@ -37,6 +38,9 @@ class Scene {
|
||||
//初始化ADAS
|
||||
val adasMap = SceneLogCache(mutableMapOf(), true)
|
||||
sceneCache[M_ADAS_IMPL] = adasMap
|
||||
//初始化CallChat
|
||||
val callChatMap = SceneLogCache(mutableMapOf(), false)
|
||||
sceneCache[M_CHAT] = callChatMap
|
||||
//初始化deva
|
||||
val devaMap = SceneLogCache(mutableMapOf(), false)
|
||||
sceneCache[M_DEVA] = devaMap
|
||||
|
||||
Reference in New Issue
Block a user