Merge branch 'dev_robotaxi-d-app-module_260_220304_2.6.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_robotaxi-d-app-module_260_220304_2.6.0

This commit is contained in:
xinfengkun
2022-03-21 19:26:32 +08:00
68 changed files with 245 additions and 90 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 850 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 828 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -26,7 +26,7 @@ class OCHTaxiConst {
const val PATH = "/och/api"
// 到达起始点围栏
const val ARRIVE_AT_START_STATION_DISTANCE = 10 //围栏由20m改为50m 再次改为10m
const val ARRIVE_AT_START_STATION_DISTANCE = 15 //围栏由20m改为50m 再次改为15m
// 上报心跳轮询ms
const val LOOP_PERIOD_60S = 60 * 1000L

View File

@@ -316,7 +316,7 @@ public class OCHTaxiFragment extends BaseOchTaxiTabFragment<OCHTaxiFragment, OCH
}
public void onServiceDataUpdate(long dailyTimeDuration, long dailyOrderNum) {
if (null == personalDialogFragment) return;
if (null == personalDialogFragment || personalDialogFragment.get() == null) return;
personalDialogFragment.get().onServiceDataUpdate(dailyTimeDuration, dailyOrderNum);
}

View File

@@ -7,6 +7,7 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.config.HdMapBuildConfig;
import com.mogo.eagle.core.data.config.HmiBuildConfig;
import com.mogo.eagle.core.data.constants.MoGoConfig;
import com.mogo.eagle.core.function.call.analytics.AnalyticsManager;
import com.mogo.eagle.core.function.main.MainMoGoApplication;
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
@@ -32,6 +33,12 @@ public class MogoApplication extends MainMoGoApplication {
crashSystem.setDebug(BuildConfig.DEBUG);
}
@Override
protected void initAnalyticsConfig() {
// 初始化埋点
AnalyticsManager.INSTANCE.init(this, DebugConfig.isDebug());
}
@Override
protected void initLogConfig() {
super.initLogConfig();
@@ -107,7 +114,7 @@ public class MogoApplication extends MainMoGoApplication {
HmiBuildConfig.isShowTurnLightView = false;
}
if (DebugConfig.getProductFlavor().equals("fPadLenovoOchTaxiPassenger")){
if (DebugConfig.getProductFlavor().equals("fPadLenovoOchTaxiPassenger")) {
//是否显示 限速UI
HmiBuildConfig.isShowLimitingVelocityView = false;
//是否显示 红绿等

View File

@@ -14,10 +14,11 @@ import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.autopilot.*
import com.mogo.eagle.core.data.deva.chain.ChainConstant
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.constants.MoGoConfig
import com.mogo.eagle.core.data.deva.chain.ChainConstant
import com.mogo.eagle.core.data.deva.scene.SceneModule
import com.mogo.eagle.core.data.deva.scene.SceneTAG
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.data.obu.ObuStatusInfo
@@ -45,17 +46,13 @@ import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
import com.mogo.eagle.core.utilcode.util.*
import com.mogo.map.MogoMap
import com.mogo.map.uicontroller.VisualAngleMode
import com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_300
import com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_CROSS
import com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_TOP
import com.mogo.map.uicontroller.VisualAngleMode.MODE_LONG_SIGHT
import com.mogo.map.uicontroller.VisualAngleMode.*
import com.mogo.module.common.MogoApisHandler
import kotlinx.android.synthetic.main.view_debug_setting.view.*
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
@@ -98,6 +95,8 @@ class DebugSettingView @JvmOverloads constructor(
//当前PAD支持的CPU架构
private var cpuList = "CPU架构"
//日志过滤标签集合
private val sceneMap = mutableMapOf< String, SceneModule>()
private var dockerRebootDialog: DockerRebootDialog? = null //docker重启对话框
private var adUpgradeDialog : AdUpgradeDialog? = null //工控机升级对话框
@@ -819,6 +818,40 @@ class DebugSettingView @JvmOverloads constructor(
//ADAS日志标签
cbAdasLog.setOnCheckedChangeListener { _, isChecked ->
val adasModule = SceneModule(isChecked,SceneConstant.M_ADAS_IMPL)
sceneMap[SceneConstant.M_ADAS_IMPL] = adasModule
CallerDevaToolsManager.updateModuleTAG(sceneMap)
}
//OBU日志标签
cbObuLog.setOnCheckedChangeListener { _, isChecked ->
val obuModule = SceneModule(isChecked,SceneConstant.M_OBU)
sceneMap[SceneConstant.M_OBU] = obuModule
CallerDevaToolsManager.updateModuleTAG(sceneMap)
}
//HMI日志标签
cbHmiLog.setOnCheckedChangeListener { _, isChecked ->
val hmiModule = SceneModule(isChecked,SceneConstant.M_HMI)
sceneMap[SceneConstant.M_HMI] = hmiModule
CallerDevaToolsManager.updateModuleTAG(sceneMap)
}
//V2X日志标签
cbV2xLog.setOnCheckedChangeListener { _, isChecked ->
val v2xModule = SceneModule(isChecked,SceneConstant.M_V2X)
sceneMap[SceneConstant.M_V2X] = v2xModule
CallerDevaToolsManager.updateModuleTAG(sceneMap)
}
//地图日志标签
cbMapLog.setOnCheckedChangeListener { _, isChecked ->
val mapModule = SceneModule(isChecked,SceneConstant.M_MAP)
sceneMap[SceneConstant.M_MAP] = mapModule
CallerDevaToolsManager.updateModuleTAG(sceneMap)
}
//开始停止抓取全量日志
tbLogCatch.isChecked =
SharedPrefsMgr.getInstance(context).getBoolean(MoGoConfig.CATCH_LOG, false)

View File

@@ -1313,16 +1313,6 @@
android:orientation="vertical"
android:visibility="gone">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#B200BCD4"
android:padding="@dimen/dp_10"
android:text="日志输出控制"
android:textColor="#000"
android:textSize="@dimen/dp_28"
android:textStyle="bold" />
<com.google.android.flexbox.FlexboxLayout
android:id="@+id/flLogControl"
android:layout_width="match_parent"
@@ -1367,34 +1357,98 @@
</com.google.android.flexbox.FlexboxLayout>
<com.google.android.flexbox.FlexboxLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:alignContent="flex_start"
app:alignItems="center"
app:flexDirection="row"
app:flexWrap="wrap"
app:justifyContent="flex_start"
tools:visibility="visible">
<CheckBox
android:id="@+id/cbAdasLog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="ADAS日志"
style="@style/DebugSettingText"
/>
<CheckBox
android:id="@+id/cbObuLog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="OBU日志"
style="@style/DebugSettingText"
/>
<CheckBox
android:id="@+id/cbHmiLog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="HMI日志"
style="@style/DebugSettingText"
/>
<CheckBox
android:id="@+id/cbV2xLog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="V2X日志"
style="@style/DebugSettingText"
/>
<CheckBox
android:id="@+id/cbMapLog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="地图日志"
style="@style/DebugSettingText"
/>
</com.google.android.flexbox.FlexboxLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_90"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ToggleButton
android:id="@+id/tbLogCatch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:textOff="开始抓取全量日志"
android:textOn="停止抓取全量日志"
android:textSize="@dimen/dp_24"
/>
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/etLogCatch"
android:layout_width="0dp"
android:layout_height="@dimen/dp_80"
android:layout_weight="2"
android:background="#32009688"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:digits="0123456789"
android:gravity="center"
android:hint="默认10分钟"
android:minHeight="48dp"
android:padding="@dimen/dp_5"
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbLogCatch"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center"
android:padding="@dimen/dp_5"
android:textOff="开始抓取全量日志"
android:textOn="停止抓取全量日志"
android:textSize="@dimen/dp_24" />
android:textColor="#1A1A1A"
android:textSize="14sp"
android:background="@drawable/debug_setting_edit_bg"
android:layout_marginStart="@dimen/dp_30"
android:layout_marginEnd="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10"
/>
</LinearLayout>

View File

@@ -21,11 +21,11 @@ import com.mogo.eagle.core.data.constants.MoGoConfig;
import com.mogo.eagle.core.data.constants.MogoServicePaths;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.chat.biz.ChatConsts;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.notice.PushUIConstants;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import com.mogo.eagle.core.utilcode.util.ProcessUtils;
import com.mogo.map.MapApiPath;
@@ -92,6 +92,11 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
*/
protected abstract void initCrashConfig();
/**
* 初始化异常采集配置
*/
protected abstract void initAnalyticsConfig();
/**
* 初始化日志
*/
@@ -117,6 +122,7 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
@Override
protected void asyncInitImpl() {
super.asyncInitImpl();
initAnalyticsConfig();
}
@Override
@@ -214,7 +220,7 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
Double.parseDouble(latitude),
Double.parseDouble(longitude));
} catch (NumberFormatException e) {
// e.printStackTrace();
// e.printStackTrace();
httpDnsSimpleLocation = new HttpDnsSimpleLocation("010", 1, 1);
}
//CallerLogger.INSTANCE.d(M_MAIN + TAG, "使用缓存GPS信息" + httpDnsSimpleLocation);

View File

@@ -8,9 +8,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.analytics.AnalyticsUtils;
import com.mogo.commons.mvp.MvpFragment;
import com.mogo.eagle.core.function.notice.Config;
import com.mogo.eagle.core.function.notice.R;
import com.mogo.eagle.core.function.notice.adapter.PushMessageAdapter;
import com.mogo.eagle.core.function.notice.model.PushBean;
@@ -25,9 +23,6 @@ import com.mogo.module.common.view.OnPreventFastClickListener;
import org.jetbrains.annotations.NotNull;
import java.util.HashMap;
import java.util.Map;
/**
* @author congtaowang
* @since 2020/9/1
@@ -66,7 +61,6 @@ public class MessageHistoryFragment extends MvpFragment< MessageHistoryView, Mes
mEmptyPlaceHolder = findViewById( R.id.module_push_id_not_data );
mClose = findViewById( R.id.module_push_id_close );
AnalyticsUtils.track( Config.NEWS_HISTORY_OPEN, null );
mClose.setOnClickListener( new OnPreventFastClickListener() {
@Override
public void onClickImpl( View v ) {
@@ -76,7 +70,6 @@ public class MessageHistoryFragment extends MvpFragment< MessageHistoryView, Mes
mClear.setOnClickListener( new OnPreventFastClickListener() {
@Override
public void onClickImpl( View v ) {
AnalyticsUtils.track( Config.NEWS_HISTORY_ALL_CLEAR, null );
if ( !mClearing ) {
mClearing = true;
AnimatorUtilsKt.startClearAnimator(
@@ -97,12 +90,8 @@ public class MessageHistoryFragment extends MvpFragment< MessageHistoryView, Mes
}
mViewModel.delete( bean );
if ( action ) {
Map< String, Object > prop = new HashMap<>();
prop.put( "title", bean.getTitle() );
AnalyticsUtils.track( Config.NEWS_HISTORY_ONE_CLICK, prop );
exitSelf();
} else {
AnalyticsUtils.track( Config.NEWS_HISTORY_ONE_CLEAR, null );
mAdapter.removeItem( bean );
if ( mAdapter.getItemCount() == 0 ) {
mEmptyPlaceHolder.setVisibility( View.VISIBLE );

View File

@@ -12,7 +12,7 @@
android:layout_width="@dimen/module_v2x_brake_image_width"
android:layout_height="@dimen/module_v2x_brake_image_width"
android:layout_marginStart="@dimen/module_v2x_brake_image_margin_left"
android:src="@drawable/v2x_icon_ahead_car_brake"
android:src="@drawable/icon_warning_v2x_emergency_brake"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -43,10 +43,13 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
implementation rootProject.ext.dependencies.arouter
implementation rootProject.ext.dependencies.arouter
kapt rootProject.ext.dependencies.aroutercompiler
// MoGo 数据埋点工具
implementation rootProject.ext.dependencies.analytics
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogo_core_data
implementation rootProject.ext.dependencies.mogo_core_utils

View File

@@ -0,0 +1,61 @@
package com.mogo.eagle.core.function.call.analytics
import android.content.Context
import androidx.annotation.Keep
import androidx.collection.ArrayMap
import com.elegant.analytics.Analytics
import com.elegant.analytics.AnalyticsConfig
import com.elegant.analytics.IAnalyticsParamsProvider
import com.elegant.analytics.UploadMode
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
/**
* 埋点&数据统计 管理
* @author donghongyu
*/
object AnalyticsManager {
@Keep
fun init(context: Context?, isDebug: Boolean) {
// 1 - debug 近实时上报积累一条埋点上报或者积累3秒上报一次。
// 2 - 本地缓存聚合上报积累30条埋点上报或者积累60秒上报一次。
AnalyticsConfig.getInstance(context).appKey = "6bbe7e0e1ecd8e2f8dc336e1678a2791"
AnalyticsConfig.getInstance(context).uploadMode = if (isDebug) UploadMode.instant else UploadMode.cache
AnalyticsConfig.getInstance(context).setShouldLog(isDebug)
// 设置参数提供者
AnalyticsConfig.getInstance(context).paramsProvider = object : IAnalyticsParamsProvider {
// 静态参数
override fun staticParams(): Map<String, Any> {
return getAnalyticsCustomParams(isDebug)
}
//动态参数
override fun dynamicParams(): Map<String, Any>? {
return null
}
}
Analytics.getInstance().start(context)
}
/**
* 埋点
*
* @param event 事件名称
* @param properties 事件参数
*/
fun track(event: String?, properties: Map<String?, Any?>?) {
Analytics.getInstance().track(event, properties)
}
/**
* 静态的统计参数
*/
fun getAnalyticsCustomParams(isDebug: Boolean): Map<String, Any> {
val map: MutableMap<String, Any> = ArrayMap()
map["debug"] = if (isDebug) 1 else 0
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
return map
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -36,12 +36,12 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
api rootProject.ext.dependencies.androidxappcompat
api rootProject.ext.dependencies.analytics
implementation rootProject.ext.dependencies.androidxappcompat
implementation rootProject.ext.dependencies.analytics
implementation rootProject.ext.dependencies.arouter
annotationProcessor rootProject.ext.dependencies.aroutercompiler
implementation rootProject.ext.dependencies.rxjava
api rootProject.ext.dependencies.mogoaicloudrealtime
implementation rootProject.ext.dependencies.mogoaicloudrealtime
implementation rootProject.ext.dependencies.amapnavi3dmap
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {

View File

@@ -15,7 +15,6 @@ import android.widget.TextView;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.aicloud.services.httpdns.IMogoHttpDns;
import com.mogo.aicloud.services.httpdns.MogoHttpDnsHandler;
import com.mogo.commons.analytics.AnalyticsUtils;
import com.mogo.commons.crash.FinalizeCrashFixer;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.device.Devices;
@@ -74,12 +73,12 @@ public abstract class AbsMogoApplication extends Application {
*/
private void initARouter() {
try {
ARouter.init(sApp);
// 初始化 arouter
if (DebugConfig.isDebug()) {
ARouter.openDebug();
ARouter.openLog();
}
// 初始化 arouter
ARouter.init(sApp);
} catch (Exception e) {
e.printStackTrace();
// 由于ARouter会在SP_AROUTER_CACHE.xml缓存路由表如果出现了被删除的情况会报错这里清除下就好了
@@ -149,15 +148,12 @@ public abstract class AbsMogoApplication extends Application {
*/
protected void asyncInit() {
ThreadPoolService.execute(() -> {
//初始化网络配置
NetConfigUtils.init();
// 初始化埋点
AnalyticsUtils.init(sApp);
if (DebugConfig.getCarMachineType() == CAR_MACHINE_TYPE_SELF_INNOVATE) {
Devices.init(getApp());
Devices.checkBindState();
}
//初始化网络配置
NetConfigUtils.init();
asyncInitImpl();
});
}

View File

@@ -37,13 +37,13 @@ enum class EventTypeEnum(
//施工
FOURS_ROAD_WORK(
"10006", "道路施工", "前方施工", R.drawable.v2x_icon_daolushigong_vr,
"10006", "道路施工", "前方施工", R.drawable.icon_warning_v2x_road_construction,
"前方施工", "道路施工"
),
//拥堵
FOURS_BLOCK_UP(
"10007", "道路拥堵", "前方拥堵", R.drawable.v2x_icon_yongdu_vr,
"10007", "道路拥堵", "前方拥堵", R.drawable.icon_warning_v2x_congestion,
"前方道路拥堵", "道路拥堵"
),

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -8,7 +8,7 @@
<dimen name="module_v2n_image_margin_left">37px</dimen>
<dimen name="module_v2x_brake_tip_width">435px</dimen>
<dimen name="module_v2x_brake_tip_height">186px</dimen>
<dimen name="module_v2x_brake_image_width">133px</dimen>
<dimen name="module_v2x_brake_image_width">120px</dimen>
<dimen name="module_v2x_brake_image_margin_left">37px</dimen>
<dimen name="module_v2x_brake_image_margin_right">27px</dimen>

View File

@@ -20,7 +20,9 @@ public interface IMogoAnalytics extends IProvider {
*
* @param event 事件名称
* @param properties 埋点参数
* @see AnalyticsManager
*/
@Keep
@Deprecated
void track( String event, Map< String, Object > properties );
}

View File

@@ -18,13 +18,13 @@ import com.aispeech.export.config.AuthConfig;
import com.aispeech.export.config.EchoConfig;
import com.aispeech.export.engines.AILocalTTSEngine;
import com.aispeech.export.intent.AILocalTTSIntent;
import com.aispeech.export.listeners.AILocalTTSListener;
import com.aispeech.export.listeners.AITTSListener;
import com.aispeech.lite.AuthType;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.cloud.commons.BuildConfig;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
import com.mogo.eagle.core.utilcode.util.ToastUtils;
import com.mogo.tts.base.IMogoTTS;
import com.mogo.tts.base.IMogoTTSCallback;
@@ -59,27 +59,29 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
private boolean mInitReady = true;
private Context mContext;
public synchronized void release() {
public void release() {
CallerLogger.INSTANCE.d(TAG, "release");
if (mCmdMap != null && !mCmdMap.isEmpty() && mVoiceClient != null) {
for (String cmd : mCmdMap.keySet()) {
try {
mVoiceClient.unRegisterCustomWakeupCmd(cmd);
} catch (Exception e) {
e.printStackTrace();
ThreadUtils.runOnUiThread(() -> {
if (mCmdMap != null && !mCmdMap.isEmpty() && mVoiceClient != null) {
for (String cmd : mCmdMap.keySet()) {
try {
mVoiceClient.unRegisterCustomWakeupCmd(cmd);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
mQAndAMap.clear();
mVoiceClient.release();
if (mEngine != null) {
mEngine.destroy();
mEngine = null;
}
mHasAuth = false;
mSpeakVoiceMap.clear();
mCacheUnWakeupCommands.clear();
mContext = null;
mQAndAMap.clear();
mVoiceClient.release();
if (mEngine != null) {
mEngine.destroy();
mEngine = null;
}
mHasAuth = false;
mSpeakVoiceMap.clear();
mCacheUnWakeupCommands.clear();
mContext = null;
});
}
private VoiceClient mVoiceClient;
@@ -147,8 +149,10 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
@Override
public void success() {
CallerLogger.INSTANCE.d(TAG, "授权成功");
mHasAuth = true;
initTtsEngine();
ThreadUtils.runOnUiThread(() -> {
mHasAuth = true;
initTtsEngine();
});
}
@Override
@@ -251,7 +255,7 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
if (!mCmdMap.containsKey(cmd)) {
return;
}
CallerLogger.INSTANCE.d(TAG, "received command : " + cmd);
CallerLogger.INSTANCE.d(TAG, "received command : " + cmd);
Iterator<IMogoTTSCallback> iterator = null;
try {
@@ -447,7 +451,7 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
mVoiceClient.registerCustomWakeupCmd(cmd, cmdWords);
mCacheUnWakeupCommands.remove(cmd);
}
CallerLogger.INSTANCE.i(TAG, "cache un wakeup command2. " + cmd);
CallerLogger.INSTANCE.i(TAG, "cache un wakeup command2. " + cmd);
mCacheUnWakeupCommands.put(cmd, cmdWords);
}
@@ -463,7 +467,7 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
mVoiceClient.registerCustomWakeupCmd(cmd, cmdWords);
mCacheUnWakeupCommands.remove(cmd);
}
CallerLogger.INSTANCE.i(TAG, "cache un wakeup command. " + cmd);
CallerLogger.INSTANCE.i(TAG, "cache un wakeup command. " + cmd);
mCacheUnWakeupCommands.put(cmd, cmdWords);
}
@@ -514,7 +518,7 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
* @param status window_start_cancel 0 - 结束, 1 - 显示, 2 - 未激活调试进入
*/
public static void startAssistant(Context context, int status) {
CallerLogger.INSTANCE.w(TAG, "startAssistant status = " + status);
CallerLogger.INSTANCE.w(TAG, "startAssistant status = " + status);
final Intent intent = new Intent();
intent.setFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);