Merge branch 'dev_MogoAP_eagle-220_211207_8.0.15'
# Conflicts: # core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java # modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java
This commit is contained in:
@@ -38,11 +38,12 @@ public class MogoApplication extends MainMoGoApplication {
|
||||
initCrash();
|
||||
initApmInsight();
|
||||
//设置debug模式,日志不上传
|
||||
// crashSystem.setDebug(BuildConfig.DEBUG);
|
||||
crashSystem.setDebug(BuildConfig.DEBUG);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initLogConfig() {
|
||||
super.initLogConfig();
|
||||
Logger.init(BuildConfig.DEBUG ? LogLevel.DEBUG : LogLevel.OFF);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ class AutoPilotStatusView @JvmOverloads constructor(
|
||||
CallerHmiListenerManager.invokeCheckAutoPilotBtnListener(false)
|
||||
}
|
||||
}
|
||||
startAutoPilot()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.main;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Process;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -11,6 +10,7 @@ import com.mogo.cloud.httpdns.bean.HttpDnsSimpleLocation;
|
||||
import com.mogo.cloud.passport.IMoGoTokenCallback;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.cloud.socket.SocketBuildConfig;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.constants.SharedPrefsConstants;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
@@ -27,7 +27,7 @@ import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.common.constants.HostConst;
|
||||
import com.mogo.module.main.service.MogoMainService;
|
||||
import com.mogo.module.push.base.PushUIConstants;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.module.share.constant.ShareConstants;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
@@ -41,6 +41,8 @@ import com.zhidao.boot.persistent.lib.PersistentManager;
|
||||
import com.zhidao.support.obu.ami.AmiClientManager;
|
||||
import com.zhjt.service.chain.core.ChainTraceStarter;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
/**
|
||||
* 默认初始化一些基础服务配置
|
||||
*/
|
||||
@@ -87,7 +89,18 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
/**
|
||||
* 初始化日志
|
||||
*/
|
||||
protected abstract void initLogConfig();
|
||||
protected void initLogConfig() {
|
||||
// 为了不引入maven的情况下修改日志控制字段值,采用反射
|
||||
try {
|
||||
Class clazz = Class.forName("com.mogo.cloud.location.LocationConfig");
|
||||
Field nameField = clazz.getField("isPrintLog");
|
||||
nameField.setBoolean(null, false);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
SocketBuildConfig.isPrintLog = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 初始化 MoGoAiCloudClientConfig
|
||||
@@ -326,8 +339,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
|
||||
if (!DebugConfig.isLauncher()) {
|
||||
PersistentManager.getInstance().initManager(this);
|
||||
Intent intent = new Intent(this, MogoMainService.class);
|
||||
startService(intent);
|
||||
}
|
||||
|
||||
Log.i(TAG, "App launch timer cost " + (System.currentTimeMillis() - start) + "ms");
|
||||
|
||||
@@ -30,8 +30,8 @@ import java.util.List;
|
||||
*/
|
||||
public class AutopilotControlParameters {
|
||||
|
||||
public String startName;
|
||||
public String endName;
|
||||
public String startName="";
|
||||
public String endName="";
|
||||
public AutoPilotLonLat startLatLon;
|
||||
public List<AutoPilotLonLat> wayLatLons;
|
||||
public AutoPilotLonLat endLatLon;
|
||||
|
||||
@@ -37,7 +37,7 @@ kapt.include.compile.classpath=false
|
||||
android.useAndroidX=true
|
||||
# Automatically convert third-party libraries to use AndroidX
|
||||
android.enableJetifier=true
|
||||
android.jetifier.blacklist=module-service-2.1.14.5.aar
|
||||
android.jetifier.blacklist=module-service-2.1.14.9.aar
|
||||
## maven 配置
|
||||
RELEASE_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-releases/
|
||||
SNAPSHOT_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-snapshots/
|
||||
@@ -63,21 +63,21 @@ SERVICE_CHAIN_VERSION=1.0.43
|
||||
LOGLIB_VERSION=1.1.6
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 网络请求
|
||||
MOGO_NETWORK_VERSION=1.3.13
|
||||
MOGO_NETWORK_VERSION=1.3.15
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.3.13
|
||||
MOGO_PASSPORT_VERSION=1.3.15
|
||||
# 常链接
|
||||
MOGO_SOCKET_VERSION=1.3.13
|
||||
MOGO_SOCKET_VERSION=1.3.15
|
||||
# 数据采集
|
||||
MOGO_REALTIME_VERSION=1.3.13
|
||||
MOGO_REALTIME_VERSION=1.3.15
|
||||
# 探路,道路事件发布,获取
|
||||
MOGO_TANLU_VERSION=1.3.13
|
||||
MOGO_TANLU_VERSION=1.3.15
|
||||
# 直播推流
|
||||
MOGO_LIVE_VERSION=1.3.13
|
||||
MOGO_LIVE_VERSION=1.3.15
|
||||
# 直播拉流
|
||||
MOGO_TRAFFICLIVE_VERSION=1.3.13
|
||||
MOGO_TRAFFICLIVE_VERSION=1.3.15
|
||||
# 定位服务
|
||||
MOGO_LOCATION_VERSION=1.3.13
|
||||
MOGO_LOCATION_VERSION=1.3.15
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.0.0.18
|
||||
@@ -89,102 +89,102 @@ applicationName=IntelligentPilot
|
||||
versionCode=80007
|
||||
versionName=8.0.15
|
||||
################# 新架构模块Maven版本管理 #################
|
||||
MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_CHECK_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_HMI_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_MAIN_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_MAP_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_MONITORING_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_NOTICE_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_OBU_MOGO_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_SMP_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_V2X_VERSION=0.0.56.5
|
||||
MOGO_CORE_DATA_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_API_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_CALL_VERSION=0.0.56.5
|
||||
MOGO_CORE_RES_VERSION=0.0.56.5
|
||||
MOGO_CORE_UTILS_VERSION=0.0.56.5
|
||||
MOGO_CORE_NETWORK_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.56.9
|
||||
MOGO_CORE_FUNCTION_CHECK_VERSION=0.0.56.9
|
||||
MOGO_CORE_FUNCTION_HMI_VERSION=0.0.56.9
|
||||
MOGO_CORE_FUNCTION_MAIN_VERSION=0.0.56.9
|
||||
MOGO_CORE_FUNCTION_MAP_VERSION=0.0.56.9
|
||||
MOGO_CORE_FUNCTION_MONITORING_VERSION=0.0.56.9
|
||||
MOGO_CORE_FUNCTION_NOTICE_VERSION=0.0.56.9
|
||||
MOGO_CORE_FUNCTION_OBU_MOGO_VERSION=0.0.56.9
|
||||
MOGO_CORE_FUNCTION_SMP_VERSION=0.0.56.9
|
||||
MOGO_CORE_FUNCTION_V2X_VERSION=0.0.56.9
|
||||
MOGO_CORE_DATA_VERSION=0.0.56.9
|
||||
MOGO_CORE_FUNCTION_API_VERSION=0.0.56.9
|
||||
MOGO_CORE_FUNCTION_CALL_VERSION=0.0.56.9
|
||||
MOGO_CORE_RES_VERSION=0.0.56.9
|
||||
MOGO_CORE_UTILS_VERSION=0.0.56.9
|
||||
MOGO_CORE_NETWORK_VERSION=0.0.56.9
|
||||
################# 旧版本架构模块版本 #################
|
||||
## 工程内模块
|
||||
MOGO_COMMONS_VERSION=2.1.14.5
|
||||
MOGO_UTILS_VERSION=2.1.14.5
|
||||
MAP_AMAP_VERSION=2.1.14.5
|
||||
MAP_AUTONAVI_VERSION=2.1.14.5
|
||||
MOGO_MAP_VERSION=2.1.14.5
|
||||
MOGO_MAP_API_VERSION=2.1.14.5
|
||||
MOGO_SERVICE_VERSION=2.1.14.5
|
||||
MOGO_SERVICE_API_VERSION=2.1.14.5
|
||||
MOGO_CONNECTION_VERSION=2.1.14.5
|
||||
MOGO_MODULE_APPS_VERSION=2.1.14.5
|
||||
MOGO_MODULE_NAVI_VERSION=2.1.14.5
|
||||
MOGO_MODULE_SHARE_VERSION=2.1.14.5
|
||||
MOGO_MODULE_COMMON_VERSION=2.1.14.5
|
||||
MOGO_MODULE_MAIN_VERSION=2.1.14.5
|
||||
MOGO_MODULE_MAP_VERSION=2.1.14.5
|
||||
MOGO_MODULE_SERVICE_VERSION=2.1.14.5
|
||||
MOGO_MODULE_EXTENSIONS_VERSION=2.1.14.5
|
||||
MOGO_MODULE_SEARCH_VERSION=2.1.14.5
|
||||
MOGO_MODULE_BACK_VERSION=2.1.14.5
|
||||
MOGO_MODULE_V2X_VERSION=2.1.14.5
|
||||
MOGO_COMMONS_VERSION=2.1.14.9
|
||||
MOGO_UTILS_VERSION=2.1.14.9
|
||||
MAP_AMAP_VERSION=2.1.14.9
|
||||
MAP_AUTONAVI_VERSION=2.1.14.9
|
||||
MOGO_MAP_VERSION=2.1.14.9
|
||||
MOGO_MAP_API_VERSION=2.1.14.9
|
||||
MOGO_SERVICE_VERSION=2.1.14.9
|
||||
MOGO_SERVICE_API_VERSION=2.1.14.9
|
||||
MOGO_CONNECTION_VERSION=2.1.14.9
|
||||
MOGO_MODULE_APPS_VERSION=2.1.14.9
|
||||
MOGO_MODULE_NAVI_VERSION=2.1.14.9
|
||||
MOGO_MODULE_SHARE_VERSION=2.1.14.9
|
||||
MOGO_MODULE_COMMON_VERSION=2.1.14.9
|
||||
MOGO_MODULE_MAIN_VERSION=2.1.14.9
|
||||
MOGO_MODULE_MAP_VERSION=2.1.14.9
|
||||
MOGO_MODULE_SERVICE_VERSION=2.1.14.9
|
||||
MOGO_MODULE_EXTENSIONS_VERSION=2.1.14.9
|
||||
MOGO_MODULE_SEARCH_VERSION=2.1.14.9
|
||||
MOGO_MODULE_BACK_VERSION=2.1.14.9
|
||||
MOGO_MODULE_V2X_VERSION=2.1.14.9
|
||||
# 探路
|
||||
MOGO_MODULE_TANLU_VERSION=2.1.14.5
|
||||
MOGO_MODULE_TANLU_VERSION=2.1.14.9
|
||||
# 推送
|
||||
MOGO_MODULE_PUSH_VERSION=2.1.14.5
|
||||
MOGO_MODULE_PUSH_BASE_VERSION=2.1.14.5
|
||||
MOGO_MODULE_PUSH_NOOP_VERSION=2.1.14.5
|
||||
MOGO_MODULE_PUSH_VERSION=2.1.14.9
|
||||
MOGO_MODULE_PUSH_BASE_VERSION=2.1.14.9
|
||||
MOGO_MODULE_PUSH_NOOP_VERSION=2.1.14.9
|
||||
# 探路上报和分享模块
|
||||
TANLULIB_VERSION=2.1.14.5
|
||||
MOGO_TANLU_API_VERSION=2.1.14.5
|
||||
TANLULIB_VERSION=2.1.14.9
|
||||
MOGO_TANLU_API_VERSION=2.1.14.9
|
||||
#左侧面板模块
|
||||
MOGO_MODULE_LEFT_PANEL_VERSION=2.1.14.5
|
||||
MOGO_MODULE_LEFT_PANEL_NOOP_VERSION=2.1.14.5
|
||||
MOGO_MODULE_LEFT_PANEL_VERSION=2.1.14.9
|
||||
MOGO_MODULE_LEFT_PANEL_NOOP_VERSION=2.1.14.9
|
||||
# 小控件
|
||||
MOGO_MODULE_WIDGETS_VERSION=2.1.14.5
|
||||
MOGO_MODULE_WIDGETS_VERSION=2.1.14.9
|
||||
# obu
|
||||
MOGO_MODULE_OBU_VERSION=2.1.14.5
|
||||
MOGO_MODULE_OBU_MOGO_VERSION=2.1.14.5
|
||||
MOGO_MODULE_OBU_VERSION=2.1.14.9
|
||||
MOGO_MODULE_OBU_MOGO_VERSION=2.1.14.9
|
||||
# monitor
|
||||
MOGO_MODULE_MONITOR_VERSION=2.1.14.5
|
||||
MOGO_MODULE_MONITOR_VERSION=2.1.14.9
|
||||
# bugly
|
||||
CRASHREPORT_VERSION=2.1.14.5
|
||||
CRASHREPORT_BUGLY_VERSION=2.1.14.5
|
||||
CRASHREPORT_NOOP_VERSION=2.1.14.5
|
||||
CRASHREPORT_UPGRADE_VERSION=2.1.14.5
|
||||
CRASHREPORT_VERSION=2.1.14.9
|
||||
CRASHREPORT_BUGLY_VERSION=2.1.14.9
|
||||
CRASHREPORT_NOOP_VERSION=2.1.14.9
|
||||
CRASHREPORT_UPGRADE_VERSION=2.1.14.9
|
||||
## tts
|
||||
TTS_BASE_VERSION=2.1.14.5
|
||||
TTS_DI_VERSION=2.1.14.5
|
||||
TTS_ZHI_VERSION=2.1.14.5
|
||||
TTS_PAD_VERSION=2.1.14.5
|
||||
TTS_NOOP_VERSION=2.1.14.5
|
||||
TTS_BASE_VERSION=2.1.14.9
|
||||
TTS_DI_VERSION=2.1.14.9
|
||||
TTS_ZHI_VERSION=2.1.14.9
|
||||
TTS_PAD_VERSION=2.1.14.9
|
||||
TTS_NOOP_VERSION=2.1.14.9
|
||||
# 自研地图
|
||||
MAP_CUSTOM_VERSION=2.1.14.5
|
||||
MOGO_MODULE_ADAS_VERSION=2.1.14.5
|
||||
MAP_CUSTOM_VERSION=2.1.14.9
|
||||
MOGO_MODULE_ADAS_VERSION=2.1.14.9
|
||||
# 基础服务实现:passport、socket、location
|
||||
MOGO_BASE_WEBSOCKET_SDK_VERSION=2.1.14.5
|
||||
MOGO_BASE_SERVICES_APK_VERSION=2.1.14.5
|
||||
MOGO_BASE_SERVICES_SDK_VERSION=2.1.14.5
|
||||
MOGO_MODULE_CHAT_VERSION=2.1.14.5
|
||||
MOGO_BASE_WEBSOCKET_SDK_VERSION=2.1.14.9
|
||||
MOGO_BASE_SERVICES_APK_VERSION=2.1.14.9
|
||||
MOGO_BASE_SERVICES_SDK_VERSION=2.1.14.9
|
||||
MOGO_MODULE_CHAT_VERSION=2.1.14.9
|
||||
# 车聊聊
|
||||
MOGO_MODULE_CARCHATTING_VERSION=2.1.14.5
|
||||
MOGO_MODULE_CARCHATTING_VERSION=2.1.14.9
|
||||
# 车聊聊接口
|
||||
MOGO_MODULE_CARCHATTINGPROVIDER_VERSION=2.1.14.5
|
||||
MOGO_MODULE_CARCHATTINGPROVIDER_VERSION=2.1.14.9
|
||||
|
||||
# 皮肤
|
||||
MOGO_SKIN_SUPPORT_VERSION=2.1.14.5
|
||||
MOGO_SKIN_LIGHT_VERSION=2.1.14.5
|
||||
MOGO_SKIN_SUPPORT_IMPL_VERSION=2.1.14.5
|
||||
MOGO_SKIN_SUPPORT_NOOP_VERSION=2.1.14.5
|
||||
SKIN_SUPPORT_VERSION=2.1.14.5
|
||||
SKIN_SUPPORT_APPCOMPAT_VERSION=2.1.14.5
|
||||
SKIN_SUPPORT_CARDVIEW_VERSION=2.1.14.5
|
||||
SKIN_SUPPORT_CONSTRAINT_LAYOUT_VERSION=2.1.14.5
|
||||
SKIN_SUPPORT_DESIGN_VERSION=2.1.14.5
|
||||
MOGO_SKIN_SUPPORT_VERSION=2.1.14.9
|
||||
MOGO_SKIN_LIGHT_VERSION=2.1.14.9
|
||||
MOGO_SKIN_SUPPORT_IMPL_VERSION=2.1.14.9
|
||||
MOGO_SKIN_SUPPORT_NOOP_VERSION=2.1.14.9
|
||||
SKIN_SUPPORT_VERSION=2.1.14.9
|
||||
SKIN_SUPPORT_APPCOMPAT_VERSION=2.1.14.9
|
||||
SKIN_SUPPORT_CARDVIEW_VERSION=2.1.14.9
|
||||
SKIN_SUPPORT_CONSTRAINT_LAYOUT_VERSION=2.1.14.9
|
||||
SKIN_SUPPORT_DESIGN_VERSION=2.1.14.9
|
||||
# OCH
|
||||
MOGO_OCH_VERSION=2.1.14.5-test
|
||||
MOGO_OCH_VERSION=2.1.14.9-test
|
||||
MOGO_OCH_BUS_VERSION=2.0.66
|
||||
MOGO_OCH_NOOP_VERSION=2.0.66
|
||||
MOGO_OCH_TAXI_VERSION=2.0.66
|
||||
# mogoAiCloud sdk services
|
||||
MOGO_AICLOUD_SERVICES_SDK_VERSION=2.1.14.5
|
||||
MOGO_AICLOUD_SERVICES_SDK_VERSION=2.1.14.9
|
||||
################# 旧版本架构模块版本 #################
|
||||
|
||||
@@ -9,9 +9,8 @@ import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.autopilotservice.model.AdasAIDLAutopilotStateModel;
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotRoute;
|
||||
import com.zhidao.support.adas.high.bean.BasicInfo;
|
||||
import com.zhidao.support.adas.high.bean.guardian.AutopilotGuardianInfo;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
|
||||
|
||||
/**
|
||||
@@ -46,6 +45,8 @@ public class AdasProvider implements IProvider {
|
||||
}
|
||||
|
||||
private void initAdas(Context context, AdasEventManager adasEventManager) {
|
||||
CupidLogUtils.setEnableLog(false);
|
||||
CupidLogUtils.setIsWriteLog(false);
|
||||
AdasManager.getInstance().create(context);
|
||||
AdasManager.getInstance().setOnAdasListener(new OnAdasListenerAdapter());
|
||||
AdasManager.getInstance().setOnAdasConnectStatusListener(adasEventManager);
|
||||
|
||||
@@ -155,9 +155,9 @@ public class IdentifyDataDrawer extends BaseDrawer {
|
||||
while (iterator.hasNext()) {
|
||||
TrafficData result = iterator.next();
|
||||
long internal = result.getSatelliteTime() - getCurSatelliteTime();
|
||||
// if (internal > 3000) { //防止帧率过低导致误删除上一个节点对象,从而出现跳跃现象
|
||||
if (internal > 3000) { //防止帧率过低导致误删除上一个节点对象,从而出现跳跃现象
|
||||
iterator.remove();
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,9 +14,5 @@ public class SPConst {
|
||||
|
||||
private static String SP_GUIDE_FIRST_TIME_RECORD = "SP_GUIDE_FIRST_TIME_RECORD";
|
||||
|
||||
//用于多模块之间首次引导时间记录
|
||||
public static String getSPGuideRecord(){
|
||||
return SP_GUIDE_FIRST_TIME_RECORD;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import static com.mogo.module.common.utils.SPConst.getSPGuideRecord;
|
||||
import static com.mogo.module.extensions.ExtensionsModuleConst.TYPE_ENTRANCE;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_CLICK_SHARE_BUTTON;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_CLICK_SHARE_TIME;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SERVER_SHOW_DAY_COUNT;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SHARE_INNER_GUIDE;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SHARE_INNER_GUIDE_TIME;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SHARE_OUTER_GUIDE;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SHARE_OUTER_GUIDE_TIME;
|
||||
import static com.mogo.module.share.constant.ShareConstants.ONE_DAY_TIME;
|
||||
import static com.mogo.module.share.constant.ShareConstants.SEVEN_DAY_TIME;
|
||||
import static com.mogo.module.share.constant.ShareConstants.VOICE_ALERT_COUNT;
|
||||
|
||||
import android.content.Intent;
|
||||
@@ -142,9 +135,8 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
private String[] mClickShareVoiceStrings;
|
||||
|
||||
private String[] mInnerGuideVoiceStrings;
|
||||
private boolean isShowGuide;
|
||||
|
||||
private String[] mOuterGuideVoiceStrings;
|
||||
|
||||
/**
|
||||
* 搜索模块
|
||||
@@ -349,64 +341,8 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
groupUserHead.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
UiThreadHandler.postDelayed(this::playShareOuterGuideVoice, 5_000L);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private boolean isGreaterThanOneDay() {
|
||||
boolean isGreaterThanOneDay;
|
||||
long guideRecordTime = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).getLong(getSPGuideRecord(), 0);
|
||||
Logger.d(TAG, " isGreaterThanOneDay interval = " + (System.currentTimeMillis() - guideRecordTime) + "---currentTime = " + System.currentTimeMillis() + "---guideRecordTime =" + guideRecordTime);
|
||||
if ((System.currentTimeMillis() - guideRecordTime) > ONE_DAY_TIME) {
|
||||
isGreaterThanOneDay = true;
|
||||
} else {
|
||||
isGreaterThanOneDay = false;
|
||||
}
|
||||
|
||||
return isGreaterThanOneDay;
|
||||
}
|
||||
|
||||
/**
|
||||
* 外部触发引导
|
||||
*/
|
||||
private void playShareOuterGuideVoice() {
|
||||
long intervalTime = SharedPrefsMgr.getInstance(getContext()).getLong(KEY_SHARE_OUTER_GUIDE_TIME, 0);
|
||||
int shareItemSum = SharedPrefsMgr.getInstance(getContext()).getInt(KEY_SHARE_OUTER_GUIDE, 0);
|
||||
int serverIssueCount = SharedPrefsMgr.getInstance(getContext()).getInt(KEY_SERVER_SHOW_DAY_COUNT, 6);
|
||||
|
||||
if (shareItemSum < serverIssueCount) {
|
||||
long time = System.currentTimeMillis();
|
||||
Logger.d(TAG, " playShareOuterGuideVoice shareItemSum = " + shareItemSum + "---- intervalTime = " + intervalTime + "----serverIssueCount = " + serverIssueCount + "---time = " + time);
|
||||
if (intervalTime == 0) {
|
||||
SharedPrefsMgr.getInstance(getContext()).putLong(KEY_SHARE_OUTER_GUIDE_TIME, time);
|
||||
SharedPrefsMgr.getInstance(getContext()).putInt(KEY_SHARE_OUTER_GUIDE, ++shareItemSum);
|
||||
// AIAssist.getInstance(getContext()).speakTTSVoice(mOuterGuideVoiceStrings[random.nextInt(3)]);
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mOuterGuideVoiceStrings[0]);
|
||||
} else {
|
||||
Logger.d(TAG, " playShareOuterGuideVoice else interval = " + (time - intervalTime));
|
||||
if ((time - intervalTime) > SEVEN_DAY_TIME) {
|
||||
if (shareItemSum == 1) {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mOuterGuideVoiceStrings[1]);
|
||||
} else if (shareItemSum == 2) {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mOuterGuideVoiceStrings[2]);
|
||||
} else if (shareItemSum == 3) {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mOuterGuideVoiceStrings[0]);
|
||||
} else if (shareItemSum == 4) {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mOuterGuideVoiceStrings[1]);
|
||||
} else if (shareItemSum == 5) {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mOuterGuideVoiceStrings[2]);
|
||||
}
|
||||
SharedPrefsMgr.getInstance(getContext()).putLong(KEY_SHARE_OUTER_GUIDE_TIME, time);
|
||||
SharedPrefsMgr.getInstance(getContext()).putInt(KEY_SHARE_OUTER_GUIDE, ++shareItemSum);
|
||||
} else {
|
||||
Logger.e(TAG, " playShareOuterGuideVoice else < ONE_DAY_TIME ");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void playShareGuideVoice() {
|
||||
long intervalTime = SharedPrefsMgr.getInstance(getContext()).getLong(KEY_CLICK_SHARE_TIME, 0);
|
||||
int shareItemSum = SharedPrefsMgr.getInstance(getContext()).getInt(KEY_CLICK_SHARE_BUTTON, 0);
|
||||
@@ -448,33 +384,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
}
|
||||
|
||||
private void showSlideMapVoiceGuide() {
|
||||
long intervalTime = SharedPrefsMgr.getInstance(getContext()).getLong(KEY_SHARE_INNER_GUIDE_TIME, 0);
|
||||
int shareItemSum = SharedPrefsMgr.getInstance(getContext()).getInt(KEY_SHARE_INNER_GUIDE, 0);
|
||||
if (shareItemSum < VOICE_ALERT_COUNT) {
|
||||
long time = System.currentTimeMillis();
|
||||
Logger.d(TAG, " showSlideMapVoiceGuide shareItemSum = " + shareItemSum + "---- intervalTime = " + intervalTime + "---time = " + time);
|
||||
if (intervalTime == 0) {
|
||||
SharedPrefsMgr.getInstance(getContext()).putLong(KEY_SHARE_INNER_GUIDE_TIME, time);
|
||||
SharedPrefsMgr.getInstance(getContext()).putInt(KEY_SHARE_INNER_GUIDE, ++shareItemSum);
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mInnerGuideVoiceStrings[0]);
|
||||
} else {
|
||||
Logger.d(TAG, " showSlideMapVoiceGuide else interval = " + (time - intervalTime));
|
||||
if ((time - intervalTime) > ONE_DAY_TIME) {
|
||||
if (shareItemSum == 1) {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mInnerGuideVoiceStrings[1]);
|
||||
} else {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mInnerGuideVoiceStrings[2]);
|
||||
}
|
||||
SharedPrefsMgr.getInstance(getContext()).putLong(KEY_SHARE_INNER_GUIDE_TIME, time);
|
||||
SharedPrefsMgr.getInstance(getContext()).putInt(KEY_SHARE_INNER_GUIDE, ++shareItemSum);
|
||||
|
||||
} else {
|
||||
Logger.e(TAG, " showSlideMapVoiceGuide else < ONE_DAY_TIME ");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTouch(MotionEvent motionEvent) {
|
||||
@@ -484,11 +393,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_UP:
|
||||
if (isGreaterThanOneDay()) {
|
||||
if (motionEvent.getX() > 200) {
|
||||
showSlideMapVoiceGuide();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -549,10 +453,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
mClickShareVoiceStrings =
|
||||
getContext().getResources().getStringArray(R.array.click_share_voice_guide_array);
|
||||
mInnerGuideVoiceStrings =
|
||||
getContext().getResources().getStringArray(R.array.search_voice_guide_inner_array);
|
||||
mOuterGuideVoiceStrings =
|
||||
getContext().getResources().getStringArray(R.array.search_voice_guide_outer_array);
|
||||
|
||||
//TODO 因为衡阳6.30交付没有2D模式,临时方案,进入vr模式,不可缩放地图
|
||||
// 进入鹰眼模式,设置手势缩放地图失效
|
||||
|
||||
@@ -49,25 +49,11 @@
|
||||
<item>你好小智,返回桌面</item>
|
||||
</string-array>
|
||||
|
||||
<!--内部触发-->
|
||||
<string-array name="search_voice_guide_inner_array">
|
||||
<item>查询路况,唤醒小智说“天安门附近路况怎么样”</item>
|
||||
<item>想知道出行路况,唤醒小智说“中关村堵车吗”</item>
|
||||
<item>出行路况早知道,唤醒小智说“长安街路况怎么样”</item>
|
||||
</string-array>
|
||||
|
||||
<!--点击分享按钮-->
|
||||
<string-array name="click_share_voice_guide_array">
|
||||
<item>您可以将当前的路况分享给其他车友,帮助他们获得最新的路况信息,试试对我说“上报路况”</item>
|
||||
<item>您的分享信息将会帮助更多车友,当您发现以下交通事件,可以直接对我说上报路况</item>
|
||||
</string-array>
|
||||
|
||||
<!--外部触发-->
|
||||
<string-array name="search_voice_guide_outer_array">
|
||||
<item>查路况您可以直接唤醒小智说“天安门附近堵不堵”</item>
|
||||
<item>出行路况早知道,试试唤醒小智说,“附近路况怎么样”</item>
|
||||
<item>提前看看出行路况,试试唤醒小智说,“中关村路况怎么样”</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -17,6 +17,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.context.ContextHolderUtil;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.BaseFragment;
|
||||
|
||||
@@ -670,7 +670,7 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
|
||||
|
||||
@Override
|
||||
public void onProgress(int currentTime, int totalTime, boolean isRefTextTTSFinished) {
|
||||
Logger.d(TAG, "当前:" + currentTime + "ms, 总计:" + totalTime + "ms, 可信度:" + isRefTextTTSFinished);
|
||||
//Logger.d(TAG, "当前:" + currentTime + "ms, 总计:" + totalTime + "ms, 可信度:" + isRefTextTTSFinished);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user