This commit is contained in:
wangcongtao
2020-06-29 10:10:33 +08:00
parent c1fabfd4be
commit a876fef33c
6 changed files with 40 additions and 8 deletions

2
.idea/misc.xml generated
View File

@@ -4,7 +4,7 @@
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
<groovy codeStyle="LEGACY" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
</project>

View File

@@ -98,18 +98,21 @@ android {
dimension "product"
// 使用思必驰语音
buildConfigField 'int', 'AIType','2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
}
// e系列
e8xx {
dimension "product"
// 使用思必驰语音
buildConfigField 'int', 'AIType','2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
}
// d系列
d8xx {
dimension "product"
// 使用同行者语音
buildConfigField 'int', 'AIType','1'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
}
qa {
dimension "env"

View File

@@ -37,12 +37,7 @@ public class MogoApplication extends AbsMogoApplication {
@Override
public void onCreate() {
DebugConfig.setNetMode(BuildConfig.NET_ENV);
DebugConfig.setDebug(BuildConfig.DEBUG);
DebugConfig.setAIType(BuildConfig.AIType);
DebugConfig.setLaunchLocationService(BuildConfig.LAUNCH_LOCATION_SERVICE);
DebugConfig.setUseCustomNavi(BuildConfig.USE_CUSTOM_NAVI);
DebugConfig.setLauncher(BuildConfig.IS_LAUNCHER);
initDebugConfig();
super.onCreate();
// Crash 日志收集
final long start = System.currentTimeMillis();
@@ -78,6 +73,16 @@ public class MogoApplication extends AbsMogoApplication {
Log.i("timer", "cost " + (System.currentTimeMillis() - start) + "ms");
}
private void initDebugConfig(){
DebugConfig.setNetMode(BuildConfig.NET_ENV);
DebugConfig.setDebug(BuildConfig.DEBUG);
DebugConfig.setAIType(BuildConfig.AIType);
DebugConfig.setLaunchLocationService(BuildConfig.LAUNCH_LOCATION_SERVICE);
DebugConfig.setUseCustomNavi(BuildConfig.USE_CUSTOM_NAVI);
DebugConfig.setLauncher(BuildConfig.IS_LAUNCHER);
DebugConfig.setActiveAIAssistFlag( BuildConfig.AI_ASSIST_ACTIVE_STAUTS );
}
@Override
protected void init() {
super.init();

View File

@@ -151,4 +151,17 @@ public class DebugConfig {
public static void setRequestOnlineCarData( boolean sRequestOnlineCarData ) {
DebugConfig.sRequestOnlineCarData = sRequestOnlineCarData;
}
/**
* 是否支持临时激活小智
*/
private static boolean sActiveAIAssistFlag = true;
public static boolean isActiveAIAssistFlag() {
return sActiveAIAssistFlag;
}
public static void setActiveAIAssistFlag( boolean sActiveAIAssistFlag ) {
DebugConfig.sActiveAIAssistFlag = sActiveAIAssistFlag;
}
}

View File

@@ -30,7 +30,7 @@ class OnAiAssistClickListener implements View.OnClickListener {
@Override
public void onClick( View v ) {
if ( Devices.isBind() ) {
if ( Devices.isBind() || !DebugConfig.isActiveAIAssistFlag() ) {
AIAssist.startAssistant( v.getContext() );
trackNavigatorClickEvent( 5 );
} else {

View File

@@ -1,5 +1,7 @@
package com.mogo.module.common.utils;
import android.text.TextUtils;
import java.lang.reflect.Method;
/**
@@ -21,6 +23,7 @@ public class CarSeries {
public static final int CAR_SERIES_E84XCD = 51;
public static final int CAR_SERIES_E85X = 50;
public static final int CAR_SERIES_E85XCD = 51;
public static final int CAR_SERIES_E85XJD = 51;
public static int CAR_SERIES = 0;
@@ -33,6 +36,10 @@ public class CarSeries {
return CAR_SERIES;
}
String device = get( "ro.fota.device" );
if ( TextUtils.isEmpty( device ) ) {
return CAR_SERIES_F80X;
}
if ( "FG166".equals( device ) ) {
CAR_SERIES = CAR_SERIES_C80X;
} else if ( "D801-802".equals( device ) ) {
@@ -58,6 +65,10 @@ public class CarSeries {
CAR_SERIES = CAR_SERIES_E85X;
} else if ( "E85XCD".equals( device ) ) {
CAR_SERIES = CAR_SERIES_E85XCD;
} else if ( "E85XJD".equals( device ) ) {
CAR_SERIES = CAR_SERIES_E85XJD;
} else if ( device.startsWith( "E85" ) ) {
CAR_SERIES = CAR_SERIES_E85XJD;
} else {
CAR_SERIES = CAR_SERIES_F80X;
}