优化显示逻辑

This commit is contained in:
wangcongtao
2021-03-17 18:41:24 +08:00
parent 16145c5586
commit 9654a8d5a1
11 changed files with 267 additions and 53 deletions

View File

@@ -416,7 +416,7 @@ public class DebugConfig {
DebugConfig.sIsNotSmooth = sIsNotSmooth;
}
public static boolean isOCHModule(){
public static boolean isOCHModule() {
return sProductFlavor != null && sProductFlavor.startsWith( "foch" );
}
@@ -429,4 +429,39 @@ public class DebugConfig {
public static int getSelfCarSpeedYOffset() {
return sSelfCarSpeedYOffset;
}
// 环境状态
public static final int sLocation = 0;
public static final int sAdasRecognized = 1;
public static final int sDownloadSnapshot = 2;
public static final int sAutoPilotStatus = 3;
public static final int sDownloadLink = 4;
public static String[] sStatus = new String[]{
"false",
"false",
"false",
"0",
"false"
};
public synchronized static void setStatus( int type, boolean status ) {
sStatus[type] = String.valueOf( status );
}
public synchronized static void setAutoPilotStatus( String status ) {
sStatus[sAutoPilotStatus] = status;
}
public synchronized static String getAutoPilotStatus() {
return sStatus[sAutoPilotStatus];
}
public synchronized static String getStatus( int type, boolean set2False ) {
String result = sStatus[type];
if ( set2False ) {
sStatus[type] = "false";
}
return result;
}
}