Merge branch 'dev_robotaxi-d-app-module_2130_221116_2.13.0' into 'test_robotaxi-d-app-module_2130_221116_2.13.0.1'
Dev robotaxi d app module 2130 221116 2.13.0 See merge request zhjt/AndroidApp/MoGoEagleEye!379
This commit is contained in:
@@ -59,6 +59,7 @@ import com.mogo.och.common.module.biz.constant.OchCommonConst;
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback;
|
||||
import com.mogo.och.common.module.biz.provider.LoginService;
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
|
||||
import com.mogo.och.common.module.manager.AbnormalFactorsLoopManager;
|
||||
import com.mogo.och.common.module.manager.OCHAdasAbilityManager;
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil;
|
||||
@@ -166,6 +167,8 @@ public class BusOrderModel {
|
||||
OCHSocketMessageManager.INSTANCE.getMsgWriteOffPassengerType(),
|
||||
mWriteOffPassengeOnMessageListener);
|
||||
|
||||
AbnormalFactorsLoopManager.INSTANCE.startLoopAbnormalFactors(mContext);
|
||||
|
||||
//2022.1.28
|
||||
// 调用Disposable.dispose() 时候会出现InterruptedException 导致出现崩溃
|
||||
// The exception could not be delivered to the consumer because it has already canceled/disposed
|
||||
@@ -343,6 +346,8 @@ public class BusOrderModel {
|
||||
OCHSocketMessageManager.INSTANCE.getMsgMonitorType());
|
||||
OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener(
|
||||
OCHSocketMessageManager.INSTANCE.getMsgWriteOffPassengerType());
|
||||
|
||||
AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors();
|
||||
}
|
||||
|
||||
private Object readResolve() {
|
||||
@@ -433,7 +438,6 @@ public class BusOrderModel {
|
||||
clearAutopilotControlParameters();
|
||||
closeBeautificationMode();
|
||||
clearStartAutopilotTag();
|
||||
removeTipRunnables();
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "获取到小巴路线数据: " + data);
|
||||
@@ -517,6 +521,7 @@ public class BusOrderModel {
|
||||
endOrAbortTaskSuccess();
|
||||
clearBusStationDatas();
|
||||
queryBusRoutes();
|
||||
removeTipRunnables();
|
||||
// startOrStopQueryPassengerWriteOff(false);
|
||||
}
|
||||
}
|
||||
@@ -794,6 +799,8 @@ public class BusOrderModel {
|
||||
beforeTaskTips();
|
||||
}
|
||||
// startOrStopQueryPassengerWriteOff(true);
|
||||
}else {
|
||||
removeTipRunnables();
|
||||
}
|
||||
|
||||
BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
|
||||
@@ -961,6 +968,7 @@ public class BusOrderModel {
|
||||
endOrAbortTaskSuccess();
|
||||
clearBusStationDatas();
|
||||
queryBusRoutes();// 重新获取任务
|
||||
removeTipRunnables();
|
||||
// startOrStopQueryPassengerWriteOff(false);
|
||||
VoiceNotice.showNotice(mContext.getString(R.string.bus_end_task_tip));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.mogo.och.common.module.manager
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Context
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.commons.module.status.StatusDescriptor
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.common.module.utils.PermissionUtil
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/12/2
|
||||
*/
|
||||
object AbnormalFactorsLoopManager : IMogoStatusChangedListener {
|
||||
|
||||
const val TAG = "AbnormalFactorsLoopManager"
|
||||
|
||||
private const val LOOP_TIME = 10 *1000L
|
||||
private const val LOOP_DELAY = 5 * 1000L
|
||||
private var socketStatus: Boolean = false
|
||||
|
||||
private var looperDisposable : Disposable? = null
|
||||
|
||||
fun startLoopAbnormalFactors(context: Context){
|
||||
if (looperDisposable != null && !looperDisposable!!.isDisposed){
|
||||
return
|
||||
}
|
||||
i(TAG, "startLoopAbnormalFactors()")
|
||||
looperDisposable = Observable.interval(LOOP_DELAY, LOOP_TIME, TimeUnit.MILLISECONDS)
|
||||
.map { aLong -> aLong+1 }
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe{ aLong -> checkAbnormalFactors(context)}
|
||||
|
||||
//长链接监听
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG,
|
||||
StatusDescriptor.CLOUD_SOCKET,this)
|
||||
}
|
||||
|
||||
private fun checkAbnormalFactors(context: Context) {
|
||||
|
||||
var locationStatusPermsStatus = false
|
||||
var networkStatus = false
|
||||
|
||||
//定位权限
|
||||
locationStatusPermsStatus = !(!PermissionUtil.isLocServiceEnable(context) || !PermissionUtil.checkPermission(
|
||||
context, *arrayOf(
|
||||
Manifest.permission.ACCESS_FINE_LOCATION
|
||||
)
|
||||
))
|
||||
|
||||
//网络状态或者网络权限是否打开
|
||||
if (NetworkUtils.isConnected(context)){
|
||||
networkStatus = true
|
||||
}
|
||||
//长链接状态 socketStatus
|
||||
|
||||
var toastStr = ""
|
||||
if (!locationStatusPermsStatus) toastStr += "定位服务异常 "
|
||||
if (!networkStatus) toastStr += " 网络异常 "
|
||||
if (!socketStatus) toastStr += " 长链接异常 "
|
||||
|
||||
i(TAG, "abnormal_factors_Str = $toastStr")
|
||||
|
||||
if (toastStr !== ""){
|
||||
ToastUtils.showLong(toastStr + "请开启相应权限或者查看网络")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun stopLoopAbnormalFactors(){
|
||||
looperDisposable!!.dispose()
|
||||
looperDisposable == null
|
||||
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG,
|
||||
StatusDescriptor.CLOUD_SOCKET,this)
|
||||
}
|
||||
|
||||
override fun onStatusChanged(descriptor: StatusDescriptor?, isTrue: Boolean) {
|
||||
//长链接监听、
|
||||
if (StatusDescriptor.CLOUD_SOCKET == descriptor && isTrue){
|
||||
socketStatus = isTrue
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,7 @@ import com.mogo.och.common.module.biz.constant.OchCommonConst;
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback;
|
||||
import com.mogo.och.common.module.biz.provider.LoginService;
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
|
||||
import com.mogo.och.common.module.manager.AbnormalFactorsLoopManager;
|
||||
import com.mogo.och.common.module.manager.OCHAdasAbilityManager;
|
||||
import com.mogo.och.common.module.map.AmapNaviToDestinationModel;
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
|
||||
@@ -233,6 +234,9 @@ public class TaxiModel {
|
||||
OCHSocketMessageManager.INSTANCE.registerSocketMessageListener(
|
||||
OCHSocketMessageManager.INSTANCE.getMsgMonitorType(),
|
||||
mMogoOnMessageListener);
|
||||
|
||||
AbnormalFactorsLoopManager.INSTANCE.startLoopAbnormalFactors(mContext);
|
||||
|
||||
}
|
||||
|
||||
private final IMogoOnMessageListener<OCHOperationalMessage> mMogoOnMessageListener =
|
||||
@@ -265,6 +269,8 @@ public class TaxiModel {
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener);
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(null);
|
||||
|
||||
AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors();
|
||||
}
|
||||
|
||||
public void startOrStopOrderLoop(boolean start) {
|
||||
|
||||
@@ -385,31 +385,32 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment
|
||||
int min = (int)Math.ceil((double)timeInSecond/ 60f);
|
||||
String strHtml2 = "<font color=\"#CAD6FF\">里程 </font>" + "<b><font color=\"#FFFFFF\">" + dis + "</font></b>" + "<font color=\"#CAD6FF\"> "+disUnit+"</font>"
|
||||
+ "<font color=\"#CAD6FF\">,剩余 </font>" + "<b><font color=\"#FFFFFF\">" + min + "</font></b>" + "<font color=\"#CAD6FF\"> 分钟</font>";
|
||||
try {
|
||||
if (mCurrentOrder != null && mCurrentOrder.orderStatus == TaxiOrderStatusEnum.OnTheWayToStart.getCode()) { //前往上车点
|
||||
mDistanceAndTime3.setText(Html.fromHtml(strHtml2));
|
||||
if (mNaviStartIcon.getVisibility() == View.GONE){
|
||||
mNaviStartIcon.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (mCurrentOrder != null && mCurrentOrder.orderStatus == TaxiOrderStatusEnum.OnTheWayToStart.getCode()) { //前往上车点
|
||||
} else if (mCurrentOrder != null && mCurrentOrder.orderStatus == TaxiOrderStatusEnum.OnTheWayToEnd.getCode()) { //前往终点 时间单位是分钟
|
||||
if (mNaviToEndIcon.getVisibility() == View.GONE){
|
||||
mNaviToEndIcon.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
mDistanceAndTime3.setText(Html.fromHtml(strHtml2));
|
||||
if (mNaviStartIcon.getVisibility() == View.GONE){
|
||||
mNaviStartIcon.setVisibility(View.VISIBLE);
|
||||
if (mTtsLessThan200Tip < 1 && meters <= 250 && meters > 150){
|
||||
speekVoice200mTipsOnce();
|
||||
}
|
||||
mDistanceAndTime2.setText(Html.fromHtml(strHtml2));
|
||||
if (isFirstStartAutopilotDone){
|
||||
VoiceNotice.showNotice(String.format(getResources()
|
||||
.getString(R.string.module_och_taxi_order_server_start_auto_tip),
|
||||
dis,disUnit,min));
|
||||
isFirstStartAutopilotDone = false;
|
||||
}
|
||||
}
|
||||
}catch (NullPointerException e){
|
||||
|
||||
} else if (mCurrentOrder != null && mCurrentOrder.orderStatus == TaxiOrderStatusEnum.OnTheWayToEnd.getCode()) { //前往终点 时间单位是分钟
|
||||
if (mNaviToEndIcon.getVisibility() == View.GONE){
|
||||
mNaviToEndIcon.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (mTtsLessThan200Tip < 1 && meters <= 250 && meters > 150){
|
||||
speekVoice200mTipsOnce();
|
||||
}
|
||||
mDistanceAndTime2.setText(Html.fromHtml(strHtml2));
|
||||
if (isFirstStartAutopilotDone){
|
||||
VoiceNotice.showNotice(String.format(getResources()
|
||||
.getString(R.string.module_och_taxi_order_server_start_auto_tip),
|
||||
dis,disUnit,min));
|
||||
isFirstStartAutopilotDone = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void speekVoice200mTipsOnce() {
|
||||
|
||||
@@ -195,16 +195,12 @@ android {
|
||||
// launcher app
|
||||
launcher {
|
||||
dimension "basic"
|
||||
// 是否启动位置服务
|
||||
buildConfigField 'boolean', 'LAUNCH_LOCATION_SERVICE', 'true'
|
||||
// 是否作为 launcher 运行
|
||||
buildConfigField 'boolean', 'IS_LAUNCHER', 'true'
|
||||
buildConfigField 'String', 'SOCKET_APP_ID', '\"com.mogo.launcher\"'
|
||||
buildConfigField 'String', 'WORKING_BRANCH_NAME', getWorkingBranchName()
|
||||
buildConfigField 'String', 'WORKING_BRANCH_HASH', getWorkingBranchHash()
|
||||
buildConfigField 'String', 'APP_BUILD_TIME', getBuildTime()
|
||||
// 是否支持目的地导航策略
|
||||
buildConfigField 'boolean', 'IS_SUPPORT_SCHEDULE_CALCULATE_NOT_HOME_COMPANY_DISTANCE_FOR_PUSH', 'false'
|
||||
}
|
||||
// 配置网络环境,QA、线上、演示
|
||||
qa {
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.mogo.eagle.core.data.app.AppConfigInfo.workingBranchName
|
||||
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.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.launcher.BuildConfig
|
||||
import com.mogo.launcher.R
|
||||
import com.mogo.test.crashreport.CrashReportConstants
|
||||
@@ -52,17 +51,11 @@ class ConfigStartUp : AndroidStartup<Boolean>() {
|
||||
}
|
||||
DebugConfig.setNetMode(mode)
|
||||
DebugConfig.setDebug(BuildConfig.DEBUG)
|
||||
DebugConfig.setLaunchLocationService(BuildConfig.LAUNCH_LOCATION_SERVICE)
|
||||
DebugConfig.setLauncher(BuildConfig.IS_LAUNCHER)
|
||||
DebugConfig.setUseMockObuData(false)
|
||||
DebugConfig.setCarMachineType(BuildConfig.CAR_MACHINE_TYPE)
|
||||
DebugConfig.setProductFlavor(BuildConfig.FLAVOR_product)
|
||||
DebugConfig.setSocketAppId(BuildConfig.SOCKET_APP_ID)
|
||||
DebugConfig.setScheduleCalculateNotHomeCompanyDistanceForPush(BuildConfig.IS_SUPPORT_SCHEDULE_CALCULATE_NOT_HOME_COMPANY_DISTANCE_FOR_PUSH)
|
||||
DebugConfig.setNeedUploadCoordinatesInTime(BuildConfig.IS_NEED_UPLOAD_COORDINATES_IN_TIME)
|
||||
DebugConfig.setObuType(
|
||||
SharedPrefsMgr.getInstance(context).getInt("OBU_TYPE", DebugConfig.OBU_TYPE_CIDI)
|
||||
)
|
||||
}
|
||||
|
||||
private fun initOtherConfig(context: Context) {
|
||||
|
||||
@@ -18,7 +18,7 @@ import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.commons.constants.SharedPrefsConstants
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.device.Devices
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.commons.network.NetConfigUtils
|
||||
import com.mogo.commons.network.Utils
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
@@ -230,10 +230,6 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
*/
|
||||
private fun asyncInit() {
|
||||
ThreadPoolService.execute {
|
||||
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) {
|
||||
Devices.init(AbsMogoApplication.getApp())
|
||||
Devices.checkBindState()
|
||||
}
|
||||
//初始化网络配置
|
||||
NetConfigUtils.init()
|
||||
|
||||
@@ -317,7 +313,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
)
|
||||
override fun onConnectFailure() {
|
||||
CallerLogger.d(SceneConstant.M_MAIN + TAG, "socket-onConnectFailure")
|
||||
DebugConfig.setDownloadSnapshot(false)
|
||||
MogoStatusManager.getInstance().setCloudSocketMode(TAG,false)
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
@@ -330,7 +326,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
)
|
||||
override fun onConnectSuccess() {
|
||||
CallerLogger.d(SceneConstant.M_MAIN + TAG, "socket-onConnectSuccess")
|
||||
DebugConfig.setDownloadSnapshot(true)
|
||||
MogoStatusManager.getInstance().setCloudSocketMode(TAG,true)
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
@@ -343,7 +339,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
)
|
||||
override fun onConnectLost() {
|
||||
CallerLogger.d(SceneConstant.M_MAIN + TAG, "socket-onConnectLost")
|
||||
DebugConfig.setDownloadSnapshot(false)
|
||||
MogoStatusManager.getInstance().setCloudSocketMode(TAG,false)
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
|
||||
@@ -152,8 +152,8 @@ ext {
|
||||
crashreportapmbyte : "com.mogo.test:crashreport-apmbyte:${CRASHREPORT_APMBYTE_VERSION}",
|
||||
crashreportnoop : "com.mogo.test:crashreport-noop:${CRASHREPORT_NOOP_VERSION}",
|
||||
crashreportupgrade : "com.mogo.test:crashreport-upgrade:${CRASHREPORT_UPGRADE_VERSION}",
|
||||
apm_insight : 'com.volcengine:apm_insight:1.4.5.cn',
|
||||
apm_insight_crash : 'com.volcengine:apm_insight_crash:1.4.5-rc.3',
|
||||
apm_insight : 'com.volcengine:apm_insight:1.4.9.cn-rc.5',
|
||||
apm_insight_crash : 'com.volcengine:apm_insight_crash:1.4.6-rc.14',
|
||||
cicle_indicator : 'me.relex:circleindicator:2.1.6',
|
||||
|
||||
//========================= TTS语音 Maven 版本管理 =========================
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.zhjt.mogo_core_function_devatools.trace
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
@@ -39,7 +39,7 @@ object SyncConfig {
|
||||
AppConfigInfo.mapSdkVersion = MogoMap.getInstance().mogoMap.mapVersion
|
||||
}
|
||||
AppConfigInfo.isConnectNet = NetworkUtils.isConnected(context)
|
||||
AppConfigInfo.isConnectSocket = DebugConfig.isDownloadSnapshot()
|
||||
AppConfigInfo.isConnectSocket = MogoStatusManager.getInstance().isSocketOnLine
|
||||
when {
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) -> {// 司机端
|
||||
AppConfigInfo.isDriver = true
|
||||
@@ -66,8 +66,6 @@ object SyncConfig {
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
fun logOutConfig(appConfig: AppConfigInfo) {
|
||||
Log.d("$M_DEVA${"SyncConfig"}", "logOut APP Config : $appConfig")
|
||||
|
||||
startUpTraceModel.report(traceId, {
|
||||
traceId = it
|
||||
}, {
|
||||
|
||||
@@ -268,6 +268,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
if(isChecked){
|
||||
viewPassengerMsgBoxList.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxBubble.visibility = View.GONE
|
||||
viewPassengerMsgBoxList.notifyData()
|
||||
}else{
|
||||
viewPassengerMsgBoxList.visibility = View.GONE
|
||||
viewPassengerMsgBoxBubble.visibility = View.VISIBLE
|
||||
@@ -509,7 +510,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
.setGravity(Gravity.LEFT)
|
||||
.setImmersionStatusBar(true)
|
||||
.setWindowHeight(LayoutParams.MATCH_PARENT)
|
||||
.setWindowWidth(AutoSizeUtils.dp2px(context, 960f))
|
||||
// .setWindowWidth(AutoSizeUtils.dp2px(context, 960f))
|
||||
.setAnimator(object : DefaultAnimator() {
|
||||
override fun enterAnim(
|
||||
view: View,
|
||||
|
||||
@@ -69,12 +69,16 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxBean: MsgBoxBean) {
|
||||
UiThreadHandler.post {
|
||||
CallerHmiManager.updateDriverMsgBoxTipView(true)
|
||||
if(category == MsgCategory.NOTICE){
|
||||
MsgBoxConfig.noticeList.add(msgBoxBean)
|
||||
}else if(category == MsgCategory.SYS_INFO){
|
||||
MsgBoxConfig.systemInfoList.add(msgBoxBean)
|
||||
}else if(category == MsgCategory.RECORD_BAG){
|
||||
MsgBoxConfig.recordBagList.add(msgBoxBean)
|
||||
when (category) {
|
||||
MsgCategory.NOTICE -> {
|
||||
MsgBoxConfig.noticeList.add(msgBoxBean)
|
||||
}
|
||||
MsgCategory.SYS_INFO -> {
|
||||
MsgBoxConfig.systemInfoList.add(msgBoxBean)
|
||||
}
|
||||
MsgCategory.RECORD_BAG -> {
|
||||
MsgBoxConfig.recordBagList.add(msgBoxBean)
|
||||
}
|
||||
}
|
||||
if(category == MsgCategory.RECORD_BAG){
|
||||
//弹出被动录包弹窗
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.PassengerMsgBoxBubbleAdapter
|
||||
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -44,13 +45,11 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
private fun initView(){
|
||||
val linearLayoutManager = LinearLayoutManager(context)
|
||||
linearLayoutManager.orientation = LinearLayoutManager.VERTICAL
|
||||
linearLayoutManager.stackFromEnd = true
|
||||
linearLayoutManager.reverseLayout = true
|
||||
// linearLayoutManager.stackFromEnd = true
|
||||
// linearLayoutManager.reverseLayout = true
|
||||
passengerMsgBoxBubbleAdapter = PassengerMsgBoxBubbleAdapter(context as Activity)
|
||||
rvPassengerBubbleList.adapter = passengerMsgBoxBubbleAdapter
|
||||
rvPassengerBubbleList.layoutManager = linearLayoutManager
|
||||
|
||||
// setData()
|
||||
}
|
||||
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
|
||||
@@ -60,22 +59,12 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
|| msgBoxList.type == MsgBoxType.OBU){
|
||||
dataList.add(msgBoxList)
|
||||
passengerMsgBoxBubbleAdapter?.setData(dataList)
|
||||
MsgBoxConfig.noticeList.add(msgBoxList)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// fun setData(){
|
||||
// val list :ArrayList<MsgBoxBean> = ArrayList()
|
||||
// val one = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"测试"))
|
||||
// val two = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"测试"))
|
||||
// val three = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"测试"))
|
||||
// list.add(one)
|
||||
// list.add(two)
|
||||
// list.add(three)
|
||||
// passengerMsgBoxBubbleAdapter?.setData(list)
|
||||
// }
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.PassengerMsgBoxListAdapter
|
||||
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
|
||||
import com.mogo.eagle.core.utilcode.util.ResourceUtils.getDrawable
|
||||
import kotlinx.android.synthetic.main.layout_passenger_msg_box_list.view.*
|
||||
|
||||
@@ -28,6 +29,7 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr){
|
||||
|
||||
var passengerMsgBoxListAdapter: PassengerMsgBoxListAdapter ?= null
|
||||
private var noticeList: ArrayList<MsgBoxBean> ?= null
|
||||
|
||||
init{
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_passenger_msg_box_list, this, true)
|
||||
@@ -44,23 +46,20 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
|
||||
rvPassengerList.layoutManager = linearLayoutManager
|
||||
rvPassengerList.addItemDecoration(divider)
|
||||
//获取通知消息列表
|
||||
val noticeList: List<MsgBoxBean>? = CallerMsgBoxManager.getCachedNotifyData()
|
||||
noticeList= CallerMsgBoxManager.getCachedNotifyData() as ArrayList<MsgBoxBean>?
|
||||
noticeList?.reversed()
|
||||
noticeList?.let {
|
||||
passengerMsgBoxListAdapter?.setData(it.reversed())
|
||||
passengerMsgBoxListAdapter?.setData(it)
|
||||
}
|
||||
|
||||
// setData()
|
||||
}
|
||||
|
||||
fun setData(){
|
||||
val list :ArrayList<MsgBoxBean> = ArrayList()
|
||||
val one = MsgBoxBean(MsgBoxType.V2X, V2XMsg("","ceshiyixa"))
|
||||
val two = MsgBoxBean(MsgBoxType.OPERATION, V2XMsg("","ceshiyixa1"))
|
||||
val three = MsgBoxBean(MsgBoxType.OPERATION, V2XMsg("","ceshiyixa2"))
|
||||
list.add(one)
|
||||
list.add(two)
|
||||
list.add(three)
|
||||
passengerMsgBoxListAdapter?.setData(list)
|
||||
fun notifyData(){
|
||||
val localNoticeList = MsgBoxConfig.noticeList.reversed()
|
||||
noticeList?.addAll(0,localNoticeList)
|
||||
noticeList?.let {
|
||||
passengerMsgBoxListAdapter?.setData(it)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,6 +22,7 @@ import chassis.VehicleStateOuterClass
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.*
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
@@ -1721,7 +1722,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
tvServerSocketStatus.text = Html.fromHtml(
|
||||
"服务器Socket状态:${
|
||||
if (DebugConfig.isDownloadSnapshot()) {
|
||||
if (MogoStatusManager.getInstance().isSocketOnLine) {
|
||||
"<font color='blue'>正常"
|
||||
} else {
|
||||
"<font color='red'>异常"
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showTurnLight
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.KeyBoardUtil
|
||||
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -164,6 +165,8 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
private fun initOchView() {
|
||||
actvLoginout.onClick {
|
||||
EventBus.getDefault().post(EventLogout(EventLogout.LOGOUT_TYPE))
|
||||
//将消息盒子操作记录还原
|
||||
MsgBoxConfig.setUserRecord(0)
|
||||
}
|
||||
actvLoginout.visibility = View.VISIBLE
|
||||
CallerHmiManager.setBusOperationView(toolBusOperationView)
|
||||
|
||||
@@ -91,7 +91,6 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
DebugConfig.setNeedRequestUserInfo(true);
|
||||
EventBus.getDefault().register(this);
|
||||
CallerLogger.INSTANCE.i(M_HMI + TAG, "onCreate");
|
||||
}
|
||||
|
||||
@@ -187,9 +187,10 @@
|
||||
android:id="@+id/cbMsgBoxDriver"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
app:layout_constraintTop_toTopOf="@id/viewLimitingVelocity"
|
||||
app:layout_constraintBottom_toBottomOf="@id/viewLimitingVelocity"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"
|
||||
app:layout_constraintRight_toLeftOf="@id/viewLimitingVelocity"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:button="@null"
|
||||
android:background="@drawable/selector_msg_box"
|
||||
android:visibility="gone"
|
||||
@@ -226,7 +227,8 @@
|
||||
android:layout_width="864px"
|
||||
android:layout_height="746px"
|
||||
app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver"
|
||||
app:layout_constraintRight_toRightOf="@id/viewLimitingVelocity"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -235,13 +237,14 @@
|
||||
android:layout_width="864px"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver"
|
||||
app:layout_constraintRight_toRightOf="@id/viewLimitingVelocity"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView
|
||||
android:id="@+id/viewPassengerMsgBoxBubble"
|
||||
android:layout_width="864px"
|
||||
android:layout_width="650px"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toTopOf="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintLeft_toLeftOf="@id/cbMsgBoxPassenger"
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
android:ellipsize="end"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginEnd="25px"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -20,7 +20,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textColor="#99FFFFFF"
|
||||
android:textSize="26px"
|
||||
/>
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
android:ellipsize="end"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginEnd="25px"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -13,8 +13,8 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginStart="20px"
|
||||
android:layout_marginEnd="20px"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -155,7 +155,7 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
|
||||
location.altitude,
|
||||
location.bearing,
|
||||
location.speed,
|
||||
location.provider == "GPS_RTK")
|
||||
isGps)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -567,6 +567,8 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
|
||||
//删除弱势交通元素
|
||||
CallerMapUIServiceManager.getMarkerService()?.removeCvxRvInfoIndInfo(data.participant.ptcId.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.data.app
|
||||
|
||||
import android.os.Build
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.getMisChannelCode
|
||||
@@ -174,6 +175,7 @@ fun AppConfigInfo.toConfigUpload():ConfigUpload{
|
||||
configUpload.appBuildTime = appBuildTime
|
||||
configUpload.appName = appName
|
||||
configUpload.appPackageName = appPackageName
|
||||
configUpload.appFotaVersion = Build.VERSION.RELEASE
|
||||
configUpload.appVersionCode = appVersionCode
|
||||
configUpload.appVersionName = appVersionName
|
||||
configUpload.connectStatusDescribe = connectStatusDescribe
|
||||
@@ -200,5 +202,5 @@ fun AppConfigInfo.toConfigUpload():ConfigUpload{
|
||||
configUpload.widevineIDMd5 = widevineIDMd5
|
||||
configUpload.workingBranchHash = workingBranchHash
|
||||
configUpload.workingBranchName = workingBranchName
|
||||
return configUpload
|
||||
return configUpload
|
||||
}
|
||||
@@ -7,6 +7,7 @@ class ConfigUpload(
|
||||
var workingBranchHash: String? = null,
|
||||
var appBuildTime: String? = null,
|
||||
var appName: String? = null,
|
||||
var appFotaVersion: String? = null,
|
||||
var appVersionCode: Int = 0,
|
||||
var appVersionName: String? = null,
|
||||
var appPackageName: String? = null,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 是否需要实时上报坐标位置
|
||||
*/
|
||||
@@ -257,37 +161,4 @@ public class DebugConfig {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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 业务类型
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -53,5 +53,9 @@ public enum StatusDescriptor {
|
||||
*/
|
||||
VR_MODE,
|
||||
|
||||
/**
|
||||
* 云 Socket状态
|
||||
*/
|
||||
CLOUD_SOCKET
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user