8
.idea/misc.xml
generated
8
.idea/misc.xml
generated
@@ -13,10 +13,14 @@
|
||||
<map>
|
||||
<entry key="../../../../../../layout/custom_preview.xml" value="0.390625" />
|
||||
<entry key="../../../../../layout/custom_preview.xml" value="0.19947916666666668" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml" value="0.15572916666666667" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_traffic_light_vr.xml" value="0.5" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml" value="0.44375" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_autopilot_status.xml" value="0.25833333333333336" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_check_status.xml" value="1.0" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml" value="0.8466666666666667" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_traffic_light_vr.xml" value="1.0" />
|
||||
<entry key="modules/mogo-module-adas/src/main/res/drawable/module_adas_left_corner_bg.xml" value="0.22125" />
|
||||
<entry key="modules/mogo-module-adas/src/main/res/layout/dialog_adas_dispatch_remind.xml" value="0.22658490296325878" />
|
||||
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml" value="1.0" />
|
||||
<entry key="modules/mogo-module-hmi/src/main/res/layout/fragment_warning.xml" value="0.34427083333333336" />
|
||||
<entry key="modules/mogo-module-hmi/src/main/res/layout/module_hmi_warning_v2x.xml" value="0.246875" />
|
||||
<entry key="modules/mogo-module-hmi/src/main/res/layout/notification_v2x_msg_vr.xml" value="0.3453125" />
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'com.alibaba.arouter'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'kotlin-android'
|
||||
id 'kotlin-android-extensions'
|
||||
id 'kotlin-kapt'
|
||||
id 'com.alibaba.arouter'
|
||||
}
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
defaultConfig {
|
||||
@@ -11,14 +13,16 @@ android {
|
||||
versionCode Integer.valueOf(VERSION_CODE)
|
||||
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = [AROUTER_MODULE_NAME: project.getName()]
|
||||
}
|
||||
}
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
|
||||
//ARouter apt 参数
|
||||
kapt {
|
||||
useBuildCache = false
|
||||
arguments {
|
||||
arg("AROUTER_MODULE_NAME", project.getName())
|
||||
}
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
@@ -45,11 +49,9 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.coroutinescore
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
implementation 'com.google.android.material:material:1.2.1'
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(path: ':modules:mogo-module-service')
|
||||
implementation rootProject.ext.dependencies.material
|
||||
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
@@ -58,13 +60,12 @@ dependencies {
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':services:mogo-service-api')
|
||||
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':modules:mogo-module-service')
|
||||
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
}
|
||||
implementation 'com.tencent.bugly:crashreport_upgrade:latest.release'
|
||||
//其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.1.9
|
||||
implementation 'com.tencent.bugly:nativecrashreport:latest.release'
|
||||
//其中latest.release指代最新Bugly NDK版本号,也可以指定明确的版本号,例如3.0
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
package com.mogo.eagle.core.function.check;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.elegant.network.ParamsBuilder;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
import com.mogo.eagle.core.function.call.check.CallerCheckManager;
|
||||
import com.mogo.eagle.core.function.check.api.ICheckResultCallBack;
|
||||
import com.mogo.eagle.core.function.check.net.CheckApiServiceFactory;
|
||||
import com.mogo.eagle.core.function.check.net.CheckResultData;
|
||||
import com.mogo.eagle.core.function.check.view.CheckDialog;
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.LogUtils;
|
||||
import com.mogo.eagle.core.function.api.check.IMogoCheckListener;
|
||||
import com.mogo.eagle.core.function.check.view.CheckActivity;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.module.service.receiver.MogoReceiver;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.eagle.core.function.api.check.ICheckProvider;
|
||||
import com.mogo.utils.ActivityLifecycleManager;
|
||||
import com.mogo.utils.network.RequestOptions;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
|
||||
/**
|
||||
* 鹰眼系统、自动驾驶系统 检测模块
|
||||
*
|
||||
* @date 4/21/21 3:39 PM
|
||||
* 需求地址
|
||||
* wiki:http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=58204952
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_CHECK)
|
||||
public class VehicleMonitoringManager implements ICheckProvider {
|
||||
private static final String TAG = "VehicleMonitoringManager";
|
||||
private Context mContext;
|
||||
private final Map<String, CopyOnWriteArrayList> mListeners = new ConcurrentHashMap<>();
|
||||
private boolean hasTipShow = false;//是否已经弹框提示
|
||||
CheckDialog dialog;
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
LogUtils.dTag(TAG, "初始化 CheckProvider 模块");
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerVehicleMonitoringListener(String module, IMogoCheckListener listener) {
|
||||
if (listener == null || module == null) {
|
||||
LogUtils.dTag(TAG, "listener == null || intent == null");
|
||||
return;
|
||||
}
|
||||
if (!mListeners.containsKey(module)) {
|
||||
LogUtils.dTag(TAG, "intent==" + module + "listener" + listener);
|
||||
mListeners.put(module, new CopyOnWriteArrayList<>());
|
||||
}
|
||||
mListeners.get(module).add(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregisterListener(String module, IMogoCheckListener listener) {
|
||||
if (mListeners.containsKey(module)) {
|
||||
mListeners.get(module).remove(listener);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startCheckActivity(Context context) {
|
||||
Intent starter = new Intent(context, CheckActivity.class);
|
||||
starter.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
context.startActivity(starter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showCheckDialog(Context context) {
|
||||
showDialog(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkMonitor(Context context) {
|
||||
if (context != null) {
|
||||
CheckActivity.checkMonitor(context, new ICheckResultCallBack() {
|
||||
@Override
|
||||
public void callBackWithErrorState(Integer state) {
|
||||
updateMonitoringStatus(MogoReceiver.ACTION_CHECK_VEHICLE_MONITORING, state);
|
||||
if (state == 1) {
|
||||
hasTipShow = false;
|
||||
} else {
|
||||
if (hasTipShow == false) {
|
||||
showDialog(context);
|
||||
hasTipShow = true;//已弹框
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 指标异常弹框
|
||||
*/
|
||||
public void showDialog(Context context) {
|
||||
try {
|
||||
if (ActivityLifecycleManager.getInstance().isAppActive() == true &&
|
||||
AppUtils.isAppRunning(getPackageName(context)) &&
|
||||
ActivityUtils.getTopActivity() instanceof CheckActivity == false) {
|
||||
if (dialog != null) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
dialog = new CheckDialog(context, true);
|
||||
dialog.show();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param context
|
||||
* @return 当前应用的版本名称
|
||||
*/
|
||||
public static synchronized String getPackageName(Context context) {
|
||||
try {
|
||||
PackageManager packageManager = context.getPackageManager();
|
||||
PackageInfo packageInfo = packageManager.getPackageInfo(
|
||||
context.getPackageName(), 0);
|
||||
return packageInfo.packageName;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "com.mogo.launcher.f";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateMonitoringStatus(String module, Integer state) {
|
||||
List<IMogoCheckListener> listeners = mListeners.get(module);
|
||||
if (listeners != null && !listeners.isEmpty()) {
|
||||
for (IMogoCheckListener listener : listeners) {
|
||||
if (listener != null) {
|
||||
listener.updateMonitoringStatus(state);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.mogo.eagle.core.function.check
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.function.api.check.ICheckProvider
|
||||
import com.mogo.eagle.core.function.api.check.IMogoCheckListener
|
||||
import com.mogo.eagle.core.function.check.view.CheckActivity
|
||||
import com.mogo.eagle.core.function.check.view.CheckDialog
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
import com.mogo.eagle.core.utilcode.util.LogUtils
|
||||
import com.mogo.module.service.receiver.MogoReceiver
|
||||
import com.mogo.service.MogoServicePaths
|
||||
import com.mogo.utils.ActivityLifecycleManager
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
/**
|
||||
* 鹰眼系统、自动驾驶系统 检测模块
|
||||
*
|
||||
* @date 4/21/21 3:39 PM
|
||||
* 需求地址
|
||||
* wiki:http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=58204952
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_CHECK)
|
||||
class VehicleMonitoringManager : ICheckProvider {
|
||||
private val TAG = "VehicleMonitoringManager"
|
||||
|
||||
private var mContext: Context? = null
|
||||
private val mListeners: ConcurrentHashMap<String, IMogoCheckListener> = ConcurrentHashMap()
|
||||
private var hasTipShow = false //是否已经弹框提示
|
||||
var dialog: CheckDialog? = null
|
||||
|
||||
override fun init(context: Context) {
|
||||
LogUtils.dTag(TAG, "初始化 CheckProvider 模块")
|
||||
mContext = context
|
||||
}
|
||||
|
||||
override fun registerVehicleMonitoringListener(module: String, listener: IMogoCheckListener) {
|
||||
mListeners[module] = listener
|
||||
}
|
||||
|
||||
override fun unregisterListener(module: String) {
|
||||
if (mListeners.containsKey(module)) {
|
||||
mListeners.remove(module)
|
||||
}
|
||||
}
|
||||
|
||||
override fun startCheckActivity(context: Context) {
|
||||
val starter = Intent(context, CheckActivity::class.java)
|
||||
starter.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
|
||||
override fun showCheckDialog(context: Context) {
|
||||
showDialog(context)
|
||||
}
|
||||
|
||||
override fun checkMonitor(context: Context) {
|
||||
CheckActivity.checkMonitor(context) { state ->
|
||||
updateMonitoringStatus(MogoReceiver.ACTION_CHECK_VEHICLE_MONITORING, state)
|
||||
if (state == 1) {
|
||||
hasTipShow = false
|
||||
} else {
|
||||
if (!hasTipShow) {
|
||||
showDialog(context)
|
||||
hasTipShow = true //已弹框
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 指标异常弹框
|
||||
*/
|
||||
private fun showDialog(context: Context) {
|
||||
try {
|
||||
if (ActivityLifecycleManager.getInstance().isAppActive &&
|
||||
AppUtils.isAppRunning(
|
||||
AppUtils.getAppPackageName()
|
||||
) && ActivityUtils.getTopActivity() !is CheckActivity
|
||||
) {
|
||||
if (dialog != null) {
|
||||
dialog!!.dismiss()
|
||||
}
|
||||
dialog = CheckDialog(context, true)
|
||||
dialog!!.show()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateMonitoringStatus(module: String, state: Int) {
|
||||
for (listener in mListeners) {
|
||||
listener.value.updateMonitoringStatus(state)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.mogo.eagle.core.function.check.api;
|
||||
|
||||
import com.mogo.service.adas.IMogoAdasDataCallback;
|
||||
|
||||
/**
|
||||
* @author liujing
|
||||
* @description 自车检测结果回调
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
package com.mogo.eagle.core.function.check.net;
|
||||
|
||||
import java.util.Map;
|
||||
import retrofit2.http.FieldMap;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.QueryMap;
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,9 +6,6 @@ import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
@@ -23,17 +20,13 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.elegant.network.ParamsBuilder;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
import com.mogo.eagle.core.function.call.check.CallerCheckManager;
|
||||
import com.mogo.eagle.core.function.check.R;
|
||||
import com.mogo.eagle.core.function.check.api.ICheckResultCallBack;
|
||||
import com.mogo.eagle.core.function.check.net.CheckApiServiceFactory;
|
||||
import com.mogo.eagle.core.function.check.net.CheckResultData;
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.module.common.view.ImageViewClipBounds;
|
||||
import com.mogo.module.common.view.SpacesItemDecoration;
|
||||
import com.mogo.module.service.receiver.MogoReceiver;
|
||||
import com.mogo.utils.network.RequestOptions;
|
||||
import com.mogo.utils.network.utils.NetworkStatusUtil;
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.CheckResult;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
@@ -16,8 +15,6 @@ import com.mogo.eagle.core.function.check.R;
|
||||
import com.mogo.eagle.core.function.check.model.CheckItemInfo;
|
||||
import com.mogo.eagle.core.function.check.net.CheckResultData;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
/**
|
||||
* @author liujing
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.check.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.mogo.eagle.core.function.check.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextPaint;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -15,7 +13,6 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.mogo.eagle.core.function.check.R;
|
||||
import com.mogo.eagle.core.function.check.net.CheckResultData;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,8 +3,6 @@ package com.mogo.eagle.core.function.check.view;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.GradientDrawable;
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
package com.mogo.eagle.core.function.check.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.eagle.core.function.check.R;
|
||||
import com.mogo.eagle.core.function.check.model.CheckItemInfo;
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.check.IMogoCheckListener
|
||||
import com.mogo.eagle.core.function.call.check.CallerCheckManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import kotlinx.android.synthetic.main.view_check_status.view.*
|
||||
|
||||
/**
|
||||
*@author xiaoyuzhou
|
||||
*@date 2021/8/6 12:25 下午
|
||||
*/
|
||||
class CheckStatusView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMogoCheckListener {
|
||||
private val TAG = "CheckStatusView"
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_check_status, this, true)
|
||||
|
||||
setOnClickListener {
|
||||
// 启动检测页面
|
||||
CallerCheckManager.startCheckActivity(getContext())
|
||||
}
|
||||
}
|
||||
|
||||
private fun showErrorIcon() {
|
||||
errorTipImage.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
private fun dismissErrorIcon() {
|
||||
errorTipImage.visibility = View.GONE
|
||||
}
|
||||
|
||||
override fun updateMonitoringStatus(state: Int?) {
|
||||
Logger.d(TAG, "updateCheckStatus")
|
||||
if (state == 1) {
|
||||
dismissErrorIcon()
|
||||
} else {
|
||||
showErrorIcon()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
Logger.d(TAG, "onAttachedToWindow")
|
||||
//车辆监控
|
||||
CallerCheckManager.registerVehicleMonitoringListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
Logger.d(TAG, "onDetachedFromWindow")
|
||||
//车辆监控
|
||||
CallerCheckManager.unregisterListener(TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -63,5 +63,13 @@
|
||||
app:layout_goneMarginTop="40px"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.CheckStatusView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="40px"
|
||||
android:layout_marginBottom="@dimen/dp_490"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/clAutopilotStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!--车辆检测入口-->
|
||||
<TextView
|
||||
android:id="@+id/moduleHmiCheck"
|
||||
android:layout_width="@dimen/dp_128"
|
||||
android:layout_height="@dimen/dp_128"
|
||||
android:background="@drawable/module_ext_check"
|
||||
android:gravity="center"
|
||||
android:text="检测"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/module_hmi_btn_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/errorTipImage"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:src="@drawable/check_error_image"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintRight_toRightOf="@+id/moduleHmiCheck"
|
||||
app:layout_constraintTop_toTopOf="@+id/moduleHmiCheck" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -21,7 +21,7 @@ public interface ICheckProvider extends IProvider {
|
||||
*
|
||||
* @param module
|
||||
*/
|
||||
void unregisterListener(String module, IMogoCheckListener listener);
|
||||
void unregisterListener(String module);
|
||||
|
||||
/**
|
||||
* 启动检测模块
|
||||
|
||||
@@ -35,8 +35,8 @@ public class CallerCheckManager extends CallerBase {
|
||||
*
|
||||
* @param module
|
||||
*/
|
||||
public static void unregisterListener(String module, IMogoCheckListener listener) {
|
||||
getCheckProvider().unregisterListener(module, listener);
|
||||
public static void unregisterListener(String module) {
|
||||
getCheckProvider().unregisterListener(module);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -2,11 +2,11 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size
|
||||
android:width="@dimen/dp_128"
|
||||
android:height="@dimen/dp_128" />
|
||||
//填充
|
||||
android:width="@dimen/module_hmi_check_size"
|
||||
android:height="@dimen/module_hmi_check_size" />
|
||||
<!--//填充-->
|
||||
<solid android:color="@color/module_switch_map_bg" />
|
||||
//描边
|
||||
<!--//描边-->
|
||||
<stroke
|
||||
android:width="2px"
|
||||
android:color="@color/module_switch_map_bg" />
|
||||
@@ -2,7 +2,7 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="@dimen/module_switch_image_circle" />
|
||||
<corners android:radius="@dimen/module_hmi_btn_size" />
|
||||
|
||||
<solid android:color="@color/module_switch_map_bg" />
|
||||
|
||||
@@ -27,5 +27,9 @@
|
||||
<dimen name="module_hmi_autopilot_status_bg_sm_radius">30px</dimen>
|
||||
<dimen name="module_hmi_autopilot_status_bg_big_radius">70px</dimen>
|
||||
|
||||
<dimen name="module_hmi_check_size">128px</dimen>
|
||||
<dimen name="module_hmi_btn_size">60px</dimen>
|
||||
<dimen name="module_hmi_btn_text_size">44px</dimen>
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -2,4 +2,7 @@
|
||||
<resources>
|
||||
<color name="module_mogo_autopilot_status_enable">#FFFFFF</color>
|
||||
<color name="module_mogo_autopilot_status_disable">#4DFFFFFF</color>
|
||||
|
||||
<color name="module_switch_map_bg">#323C6F</color>
|
||||
|
||||
</resources>
|
||||
@@ -26,4 +26,10 @@
|
||||
|
||||
<dimen name="module_hmi_autopilot_status_bg_sm_radius">20px</dimen>
|
||||
<dimen name="module_hmi_autopilot_status_bg_big_radius">50px</dimen>
|
||||
|
||||
<dimen name="module_hmi_check_size">128px</dimen>
|
||||
<dimen name="module_hmi_btn_size">38px</dimen>
|
||||
<dimen name="module_hmi_btn_text_size">33px</dimen>
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -127,7 +127,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
IMogoStatusChangedListener,
|
||||
IMogoIntentListener,
|
||||
// IMogoLocationListener,
|
||||
IMogoCheckListener,
|
||||
IMogoCarLocationChangedListener2 {
|
||||
|
||||
private static final String TAG = "EntranceFragment";
|
||||
@@ -240,9 +239,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
private final AdasNoticeHelper adasNoticeHelper = new AdasNoticeHelper();
|
||||
private final CameraLiveNoticeHelper mCameraLiveNoticeHelper = new CameraLiveNoticeHelper();
|
||||
//检测
|
||||
private TextView jumpCheck;
|
||||
private ImageView tipImageView;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@@ -394,18 +390,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
enterVrMode();
|
||||
localIsVrMode = true;
|
||||
}
|
||||
// //检测入口
|
||||
jumpCheck = findViewById(R.id.module_ext_enter_check);
|
||||
tipImageView = findViewById(R.id.error_tip_image);
|
||||
jumpCheck.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Log.d(TAG, "体检入口");
|
||||
// 启动检测页面
|
||||
CallerCheckManager.startCheckActivity(getContext());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private int debugPanelClickCount = 0;
|
||||
@@ -723,9 +707,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
mMogoRegisterCenter.registerMogoNaviListener(TYPE_ENTRANCE, this);
|
||||
mMogoRegisterCenter.registerMogoMapListener(TYPE_ENTRANCE, this);
|
||||
//车辆监控
|
||||
CallerCheckManager.registerVehicleMonitoringListener(MogoReceiver.ACTION_CHECK_VEHICLE_MONITORING, this);
|
||||
|
||||
mMogoMarkerManager = mService.getMarkerManager(getContext());
|
||||
|
||||
mStatusManager.registerStatusChangedListener(TAG, StatusDescriptor.UPLOADING, this);
|
||||
@@ -774,7 +755,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mCameraLiveNoticeHelper.release();
|
||||
MogoApisHandler.getInstance().getApis().getRegisterCenterApi()
|
||||
.unregisterCarLocationChangedListener(TAG, this);
|
||||
CallerCheckManager.unregisterListener(MogoReceiver.ACTION_CHECK_VEHICLE_MONITORING, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1401,14 +1382,4 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateMonitoringStatus(Integer state) {
|
||||
Log.d(TAG, "updateCheckStatus");
|
||||
if (state == 1) {
|
||||
tipImageView.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
tipImageView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -319,30 +319,6 @@
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<!--车辆检测入口-->
|
||||
<TextView
|
||||
android:id="@+id/module_ext_enter_check"
|
||||
android:layout_width="@dimen/dp_128"
|
||||
android:layout_height="@dimen/dp_128"
|
||||
android:layout_marginRight="@dimen/dp_33"
|
||||
android:layout_marginBottom="@dimen/dp_476"
|
||||
android:background="@drawable/module_ext_check"
|
||||
android:gravity="center"
|
||||
android:text="检测"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/module_ext_enter_vr_mode_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/error_tip_image"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:visibility="invisible"
|
||||
android:src="@drawable/check_error_image"
|
||||
app:layout_constraintRight_toRightOf="@+id/module_ext_enter_check"
|
||||
app:layout_constraintTop_toTopOf="@+id/module_ext_enter_check" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_ext_enter_vr_mode"
|
||||
android:layout_width="@dimen/module_ext_operation_panel_share_width"
|
||||
|
||||
Reference in New Issue
Block a user