Merge branch 'dev_robotaxi-d-app-module_2130_221116_2.13.0' into mutidev_robotaxi-d-app-module_2130_221116_2.13.0_multi_display

# Conflicts:
#	app/src/main/java/com/mogo/launcher/stageone/ConfigStartUp.kt
#	foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java
This commit is contained in:
donghongyu
2022-12-02 17:35:53 +08:00
26 changed files with 94 additions and 272 deletions

View File

@@ -69,19 +69,6 @@ public class DebugConfig {
private static int sCarMachineType = CAR_MACHINE_TYPE_SELF_INNOVATE;
/**
* 西迪obu
*/
public static final int OBU_TYPE_CIDI = 1;
/**
* 华砺智行obu
*/
public static final int OBU_TYPE_HUALI = 2;
/**
* 大唐高鸿obu 11.11国展
*/
public static final int OBU_TYPE_GOHIGH = 3;
/**
* 获取网络环境类型
*
@@ -105,19 +92,6 @@ public class DebugConfig {
DebugConfig.sNetMode = netMode;
}
/**
* 是否拉起位置服务launcher 需要拉起位置服务,独立 app 不需要
*/
private static boolean sLaunchLocationService = true;
public static boolean isLaunchLocationService() {
return sLaunchLocationService;
}
public static void setLaunchLocationService(boolean launchLocationService) {
DebugConfig.sLaunchLocationService = launchLocationService;
}
/**
* 设置当前车机类型
*
@@ -149,26 +123,6 @@ public class DebugConfig {
DebugConfig.sIsLauncher = isLauncher;
}
private static boolean sRequestOnlineCarData = true;
public static boolean isRequestOnlineCarData() {
return sRequestOnlineCarData;
}
public static void setRequestOnlineCarData(boolean sRequestOnlineCarData) {
DebugConfig.sRequestOnlineCarData = sRequestOnlineCarData;
}
private static boolean useMockObuData;
public static void setUseMockObuData(boolean use) {
useMockObuData = use;
}
public static boolean isUseMockObuData() {
return useMockObuData;
}
private static String sProductFlavor;
public static String getProductFlavor() {
@@ -194,56 +148,6 @@ public class DebugConfig {
return sSocketAppId;
}
/**
* 是否支持目的地导航推送策略
*/
private static boolean isScheduleCalculateNotHomeCompanyDistanceForPush = false;
public static void setScheduleCalculateNotHomeCompanyDistanceForPush(boolean isScheduleCalculateNotHomeCompanyDistanceForPush) {
DebugConfig.isScheduleCalculateNotHomeCompanyDistanceForPush = isScheduleCalculateNotHomeCompanyDistanceForPush;
}
public static boolean isIsScheduleCalculateNotHomeCompanyDistanceForPush() {
return isScheduleCalculateNotHomeCompanyDistanceForPush;
}
/**
* 是否支持刷新桌面卡片
*/
private static boolean isSupportLauncherCardRefreshStrategy = false;
public static void setSupportLauncherCardRefreshStrategy(boolean isSupportLauncherCardRefreshStrategy) {
DebugConfig.isSupportLauncherCardRefreshStrategy = isSupportLauncherCardRefreshStrategy;
}
public static boolean isIsSupportLauncherCardRefreshStrategy() {
return isSupportLauncherCardRefreshStrategy;
}
private static int obuType = OBU_TYPE_HUALI;
public static int getObuType() {
return obuType;
}
public static void setObuType(int type) {
obuType = type;
}
/**
* 是否需要刷新个人信息
*/
private static boolean needRequestUserInfo = false;
public static void setNeedRequestUserInfo(boolean needRequestUserInfo) {
DebugConfig.needRequestUserInfo = needRequestUserInfo;
}
public static boolean isNeedRequestUserInfo() {
return needRequestUserInfo;
}
/**
* 是否需要实时上报坐标位置
*/
@@ -256,42 +160,6 @@ public class DebugConfig {
public static void setNeedUploadCoordinatesInTime(boolean sIsNeedUploadCoordinatesInTime) {
DebugConfig.sIsNeedUploadCoordinatesInTime = sIsNeedUploadCoordinatesInTime;
}
public static boolean isOCHModule() {
return sProductFlavor != null && sProductFlavor.startsWith("foch");
}
public static int sSelfCarSpeedYOffset = 20;
public static void setSelfCarSpeedYOffset(int sSelfCarSpeedYOffset) {
DebugConfig.sSelfCarSpeedYOffset = sSelfCarSpeedYOffset;
}
public static int getSelfCarSpeedYOffset() {
return sSelfCarSpeedYOffset;
}
private static boolean downloadSnapshot = false;
public static boolean isDownloadSnapshot() {
return downloadSnapshot;
}
public static void setDownloadSnapshot(boolean downloadSnapshot) {
DebugConfig.downloadSnapshot = downloadSnapshot;
}
private static boolean isUseAdasRecognize = true;
public static void setUseAdasRecognize(boolean status) {
isUseAdasRecognize = status;
}
public static boolean isUseAdasRecognize() {
return isUseAdasRecognize;
}
// 兼容是否支持多屏幕方案
private static boolean isMultiDisplay = false;

View File

@@ -1,69 +0,0 @@
package com.mogo.commons.device;
import android.content.ContentResolver;
import android.content.Context;
import android.database.ContentObserver;
import android.database.Cursor;
import android.net.Uri;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.eagle.core.utilcode.util.ThreadPoolService;
public
/*
* @author congtaowang
* @since 2020/6/8
*
* 描述
*/
class Devices {
private static final String TAG = "Devices";
public static final Uri CONTENT_URI_BIND = Uri.parse( "content://com.zhidao.guide.lock.product.bindstatus/status" );
private static boolean sIsBind = false;
public static void init( Context context ) {
if ( context == null ) {
return;
}
context.getContentResolver().registerContentObserver( CONTENT_URI_BIND, true, new ContentObserver( null ) {
@Override
public void onChange( boolean selfChange ) {
super.onChange( selfChange );
ThreadPoolService.execute( () -> {
checkBindState();
} );
}
} );
}
/**
* 检测车机激活状态
*
* @return
*/
public static boolean checkBindState() {
try {
ContentResolver resolver = AbsMogoApplication.getApp().getContentResolver();
if ( resolver == null ) {
return false;
}
try ( Cursor cursor = resolver.query( CONTENT_URI_BIND, null, null, null, null ) ) {
if ( cursor == null || !cursor.moveToFirst() ) {
return false;
}
int status = cursor.getInt( cursor.getColumnIndex( "lock_status" ) );
return sIsBind = ( status == 1 );
}
} catch ( Exception e ) {
e.printStackTrace();
}
return false;
}
public static boolean isBind() {
return sIsBind;
}
}

View File

@@ -58,6 +58,19 @@ public interface IMogoStatusManager extends IProvider {
*/
boolean isMainPageLaunched();
/**
* 长链是否在线
* @return
*/
boolean isSocketOnLine();
/**
* 设置云端 socket 状态
* @param tag 业务类型
* @param mode true - 在线 false 不在线
*/
void setCloudSocketMode(String tag, boolean mode);
/**
* 设置vrMode状态
* @param tag 业务类型

View File

@@ -83,6 +83,16 @@ public class MogoStatusManager implements IMogoStatusManager {
return get_bool_val(StatusDescriptor.MAIN_PAGE_CREATED);
}
@Override
public boolean isSocketOnLine() {
return get_bool_val(StatusDescriptor.CLOUD_SOCKET);
}
@Override
public void setCloudSocketMode(String tag, boolean mode) {
doSetStatus(tag, StatusDescriptor.CLOUD_SOCKET, mode);
}
private boolean get_bool_val(StatusDescriptor descriptor) {
Boolean val = mStatus.get(descriptor);
return val != null && val;

View File

@@ -53,5 +53,9 @@ public enum StatusDescriptor {
*/
VR_MODE,
/**
* 云 Socket状态
*/
CLOUD_SOCKET
}