Merge branch 'dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0' into gradle_och

This commit is contained in:
yangyakun
2023-03-23 20:03:18 +08:00
16 changed files with 249 additions and 80 deletions

View File

@@ -170,32 +170,31 @@ public class BusPassengerModel {
, new OchCommonServiceCallback<BusPassengerRoutesResponse>() {
@Override
public void onSuccess(BusPassengerRoutesResponse data) {
if ( data == null
|| data.getResult() == null
|| data.getResult().getSites() == null) {
routesResult = null;
mNextStationIndex = 0;
startOrStopCalculateRouteInfo(false);
if (mRouteLineInfoCallback != null){
mRouteLineInfoCallback.showNoTaskView();
if ( data == null || data.getResult() == null) {
CallerLogger.INSTANCE.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = null");
if (routesResult != null) {
routesResult = null;
mNextStationIndex = 0;
startOrStopCalculateRouteInfo(false);
if (mRouteLineInfoCallback != null){
mRouteLineInfoCallback.showNoTaskView();
}
}
return;
}
if (routesResult != null && routesResult.equals(data.getResult())){
if (routesResult != null && data.getResult().equals(routesResult)){
CallerLogger.INSTANCE.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = not update");
return;
}
routesResult = data.getResult();
updatePassengerRouteInfo(data.getResult());
}
@Override
public void onError() {
}
@Override
public void onFail(int code, String msg) {
CallerLogger.INSTANCE.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = %s", msg );
CallerLogger.INSTANCE.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = %s", msg
+ ", sn = " +BusPassengerServiceManager.INSTANCE.getDriverAppSn());
if (code == 1003){
queryDriverOperationDelay();
}

View File

@@ -5,6 +5,7 @@ import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager.getSer
import com.mogo.och.bus.passenger.bean.BusPassengerRoutesResponse
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
import com.mogo.och.bus.passenger.bean.BusPassengerQueryLineRequest
import com.mogo.och.bus.passenger.bean.BusPassengerOperationStatusResponse
import com.mogo.eagle.core.network.MoGoRetrofitFactory
@@ -19,6 +20,8 @@ import com.mogo.och.common.module.biz.network.interceptor.transformTry
*/
object BusPassengerServiceManager {
private var driverSnCache = ""
private var mShuttleBusPassengerServiceApi =
MoGoRetrofitFactory.getInstance(getBaseUrl()).create(ShettlePassengerServiceApi::class.java)
private var mBusPassengerServiceApi =
@@ -28,8 +31,14 @@ object BusPassengerServiceManager {
* 获取Bus司机端的sn
* @return
*/
public val driverAppSn: String
get() = getServerToken()
val driverAppSn: String
get(){
val serverToken = getServerToken()
if (serverToken != driverSnCache && serverToken.isNotEmpty()) {
driverSnCache = serverToken
}
return driverSnCache
}
/**
* 查询绑定行驶的小巴车路线

View File

@@ -21,13 +21,19 @@ object PM2ServiceManager {
private var mBusPassengerServiceApi =
MoGoRetrofitFactory.getInstance(OchCommonConst.getShuttleUrl()).create(PM2ServiceApi::class.java)
private var driverSnCache = ""
/**
* 获取Bus司机端的sn
* @return
*/
public val driverAppSn: String
get() = getServerToken()
// get() = "X2020220425Q466X1F"
get(){
val serverToken = getServerToken()
if (serverToken != driverSnCache && serverToken.isNotEmpty()) {
driverSnCache = serverToken
}
return driverSnCache
}
/**
* 查询绑定行驶的小巴车路线

View File

@@ -39,17 +39,13 @@ class BusPassengerFunctionPresenter(view: M1ContainFragment?) :
VoiceNotice.showNotice(context.getString(R.string.m1_stop_site_zh), AIAssist.LEVEL1)
}
OCHPlanningStopSideStatusManager.Status.DOING -> {
// 正在靠边停车
}
OCHPlanningStopSideStatusManager.Status.Ending -> {
stopSideStatus?.let {
if(it){
ToastUtils.showShort("靠边停车成功")
}else{
ToastUtils.showShort("靠边停车失败")
}
}
OCHPlanningStopSideStatusManager.Status.EndingSuccess -> {
ToastUtils.showShort("靠边停车成功")
}
OCHPlanningStopSideStatusManager.Status.EndingFaile -> {
ToastUtils.showShort("靠边停车失败")
}
}
}

View File

@@ -368,7 +368,7 @@ class LineSiteView @JvmOverloads constructor(
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
// 自动驾驶中
when (OCHPlanningStopSideStatusManager.stopSiteStatus) {
OCHPlanningStopSideStatusManager.StopSite.NOTHING -> {
OCHPlanningStopSideStatusManager.Status.EndingSuccess -> {
isChangeIngLineAndSite = false
onlyChangeSite(false)
// 可以切换路径
@@ -376,15 +376,7 @@ class LineSiteView @JvmOverloads constructor(
setSiteAdapterEnable(false)
queryLineList()
}
OCHPlanningStopSideStatusManager.StopSite.STOPSITED -> {
isChangeIngLineAndSite = false
onlyChangeSite(false)
// 可以切换路径
setEnableLineStatus(true)
setSiteAdapterEnable(false)
queryLineList()
}
OCHPlanningStopSideStatusManager.StopSite.LANKE_KEEP ->{
else ->{
ToastUtils.showShort("自动驾驶中无法切换线路")
}
}

View File

@@ -15,7 +15,7 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
CallerPlanningActionsListenerManager.setListenerHz(TAG,5)
}
var stopSiteStatus = StopSite.NOTHING
var stopSiteStatus = Status.NOTHING
val M_LISTENERS: ConcurrentHashMap<String, OCHPlanningActionsCallback> = ConcurrentHashMap()
@@ -60,31 +60,49 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
when (drivingAction) {
MessagePad.DrivingAction.DRIVING_ACTION_STATE_ONE -> {
// 表示开始靠边停车
CallerLogger.d(SceneConstant.M_BUS+ TAG,"开始靠边停车")
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onStartAutopilotFailure(Status.START,null,null)
listener.onStartAutopilotFailure(Status.DOING,null,null)
if(stopSiteStatus == Status.START){
// 靠边停车中
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车中")
listener.onStartAutopilotFailure(Status.DOING,null,null)
}else{
// 开始靠边停车
stopSiteStatus = Status.START
CallerLogger.d(SceneConstant.M_BUS+ TAG,"开始靠边停车")
listener.onStartAutopilotFailure(Status.START,null,null)
}
}
}
MessagePad.DrivingAction.DRIVING_ACTION_STATE_TWO -> {
//表示靠边停车成功
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车成功")
stopSiteStatus = StopSite.STOPSITED
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onStartAutopilotFailure(Status.Ending,true,null)
if(stopSiteStatus == Status.EndingSuccess){
// 只响应第一次
}else{
stopSiteStatus = Status.EndingSuccess
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车成功")
listener.onStartAutopilotFailure(Status.EndingSuccess,true,null)
}
}
}
MessagePad.DrivingAction.DRIVING_ACTION_STATE_THREE -> {
//靠边停车失败
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败")
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onStartAutopilotFailure(Status.Ending,false,null)
if(stopSiteStatus==Status.EndingFaile){
// 只响应第一次
}else{
stopSiteStatus = Status.EndingFaile
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败")
listener.onStartAutopilotFailure(Status.EndingFaile,false,null)
}
}
}
else -> {}
@@ -94,11 +112,16 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
when (drivingAction) {
MessagePad.DrivingAction.DRIVING_ACTION_STATE_ONE -> {
// 表示距离前方站点100m
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因距离前方站点100m")
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onStartAutopilotFailure(Status.NOSTART,false,"距离前方站点100m,请稍后再试")
if(stopSiteStatus==Status.NOSTART){
// 只响应第一次
}else{
stopSiteStatus = Status.NOSTART
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因距离前方站点100m")
listener.onStartAutopilotFailure(Status.NOSTART,false,"距离前方站点100m,请稍后再试")
}
}
}
MessagePad.DrivingAction.DRIVING_ACTION_STATE_TWO -> {
@@ -107,47 +130,65 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onStartAutopilotFailure(Status.NOSTART,false,"距离路口100m,请稍后再试")
if(stopSiteStatus==Status.NOSTART){
// 只响应第一次
}else{
stopSiteStatus = Status.NOSTART
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因距离路口100m,请稍后再试")
listener.onStartAutopilotFailure(Status.NOSTART,false,"距离路口100m,请稍后再试")
}
}
}
MessagePad.DrivingAction.DRIVING_ACTION_STATE_THREE -> {
//正在变道
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因正在变道")
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onStartAutopilotFailure(Status.NOSTART,false,"因车辆正在变道无法靠边停车,请稍后再试")
if(stopSiteStatus==Status.NOSTART){
// 只响应第一次
}else{
stopSiteStatus = Status.NOSTART
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因正在变道")
listener.onStartAutopilotFailure(Status.NOSTART,false,"因车辆正在变道无法靠边停车,请稍后再试")
}
}
}
else -> {
//未知问题
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因未知问题")
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onStartAutopilotFailure(Status.NOSTART,false,"靠边停车失败,请稍后再试")
if(stopSiteStatus==Status.NOSTART){
// 只响应第一次
}else{
stopSiteStatus = Status.NOSTART
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因未知问题")
listener.onStartAutopilotFailure(Status.NOSTART,false,"靠边停车失败,请稍后再试")
}
}
}
}
}
MessagePad.ParkScenarioDrivingState.PARK_SENARIO_LANKE_KEEP ->{
stopSiteStatus = StopSite.LANKE_KEEP
if(stopSiteStatus==Status.NOTHING){
// 只响应第一次
}else{
stopSiteStatus = Status.NOTHING
CallerLogger.d(SceneConstant.M_BUS+ TAG,"进入正常驾驶")
}
}
else -> {}
}
}
enum class Status(val code: Int){
NOSTART(-1),
START(0),
DOING(1),
Ending(2)
}
enum class StopSite{
NOTHING,// 初始状态
STOPSITED,// 靠边停车状态
LANKE_KEEP;// 形式状态
enum class Status(){
START(),// 开始靠边停车
DOING(),// 正在靠边停车
EndingSuccess(),// 靠边停车成功
EndingFaile(),// 靠边停车失败
NOSTART(),// 没有响应靠边停车
NOTHING()// 默认状态
}
interface OCHPlanningActionsCallback {

View File

@@ -1,9 +1,13 @@
package com.mogo.launcher;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.function.api.devatools.strict.IStrictModeProvider;
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
import com.mogo.eagle.core.function.call.startup.CallerStartUpManager;
import com.mogo.eagle.core.function.main.MainMoGoApplication;
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
import com.mogo.eagle.core.utilcode.util.SharedPrefs;
import com.mogo.launcher.crash.CrashSystem;
import com.mogo.launcher.startup.ARouterStartUp;
import com.mogo.launcher.startup.ConfigStartUp;
@@ -21,9 +25,21 @@ public class MogoApplication extends MainMoGoApplication {
ARouterStartUp.init(this);
ConfigStartUp.init(this);
CallerStartUpManager.initStageOne();
tryEnableStrictMode();
super.onCreate();
}
private void tryEnableStrictMode() {
IStrictModeProvider strict = CallerDevaToolsManager.INSTANCE.strict();
if (DebugConfig.isDebug() && strict != null) {
boolean enabled = SharedPrefs.getInstance(this).getBoolean("MOGO_STRICT_MODE_ENABLED", false);
Logger.e("StrictMode", "isEnabled:" + enabled);
if (enabled) {
strict.enable();
}
}
}
@Override
protected void initCrashConfig() {
CrashSystem crashSystem = CrashSystem.getInstance(this);

View File

@@ -16,6 +16,7 @@ import com.mogo.eagle.core.data.deva.scene.SceneTAG
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
import com.mogo.eagle.core.function.api.devatools.apm.*
import com.mogo.eagle.core.function.api.devatools.strict.*
import com.mogo.eagle.core.function.call.map.*
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.zhjt.mogo_core_function_devatools.apm.*
@@ -35,6 +36,7 @@ import com.zhjt.mogo_core_function_devatools.report.IPCReportManager
import com.zhjt.mogo_core_function_devatools.report.IPCReportManager.Companion.iPCReportManager
import com.zhjt.mogo_core_function_devatools.scene.SceneManager.Companion.sceneManager
import com.zhjt.mogo_core_function_devatools.status.StatusManager
import com.zhjt.mogo_core_function_devatools.strict.*
import com.zhjt.mogo_core_function_devatools.trace.TraceManager.Companion.traceManager
import com.zhjt.mogo_core_function_devatools.tts.TtsManager.Companion.ttsManager
import com.zhjt.mogo_core_function_devatools.upgrade.UpgradeManager.Companion.upgradeManager
@@ -48,7 +50,9 @@ class DevaToolsProvider : IDevaToolsProvider {
private var mContext: Context? = null
private val apmEnvProvider by lazy { ApmEnvProviderImpl }
private val apmEnvProvider by lazy { ApmEnvProviderImpl() }
private val strictModeProvider by lazy { StrictModeProviderImpl() }
@Volatile
private var mDockerVersion: String? = null
@@ -253,4 +257,5 @@ class DevaToolsProvider : IDevaToolsProvider {
override fun queryObuUpgrade(obuVersionName: String) {
bindingCarManager.queryObuUpgrade(obuVersionName)
}
override fun strict(): IStrictModeProvider = strictModeProvider
}

View File

@@ -17,9 +17,9 @@ import java.util.concurrent.atomic.AtomicBoolean
import java.util.concurrent.atomic.AtomicReference
import kotlin.coroutines.*
object ApmEnvProviderImpl: IApmEnvProvider, CoroutineScope {
class ApmEnvProviderImpl: IApmEnvProvider, CoroutineScope {
private const val TAG = "ApmEnvProvider"
private val TAG = "ApmEnvProvider"
private val scope by lazy { CoroutineScope(Dispatchers.IO + SupervisorJob()) }

View File

@@ -0,0 +1,34 @@
package com.zhjt.mogo_core_function_devatools.strict
import android.os.*
import android.os.StrictMode.ThreadPolicy.Builder
import android.os.StrictMode.VmPolicy
import com.mogo.eagle.core.function.api.devatools.strict.*
/**
* 严格模式功能管理
* 1. 监测主线程磁盘读写
* 2. 监测主线程网络请求
* 3. 监测磁盘输入输出流使用异常(未及时关闭)
* 4. 监测数据库查询操作异常cursor使用未关闭
* 5. 监测资源类型不匹配TypedValue
* 6. 监测文件读写未使用Buffer增加buffer可以减少系统调用降低性能损耗
*/
class StrictModeProviderImpl: IStrictModeProvider {
override fun enable() {
StrictMode.setThreadPolicy(
Builder()
.detectAll()
.penaltyLog()
.penaltyDropBox()
.build())
StrictMode.setVmPolicy(
VmPolicy.Builder()
.detectAll()
.penaltyLog()
.penaltyDropBox()
.build())
}
}

View File

@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui
import android.content.Context
import android.text.TextUtils
import android.util.*
import android.view.ViewGroup
import androidx.lifecycle.ProcessLifecycleOwner
import androidx.lifecycle.lifecycleScope
@@ -42,6 +43,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.zhjt.service_biz.BizConfig
import kotlinx.coroutines.*
import kotlinx.coroutines.selects.*
import java.util.concurrent.atomic.AtomicReference
/**
@@ -60,6 +62,8 @@ class MoGoHmiProvider : IMoGoHmiProvider {
private var lastShowV2XJob: Job? = null
private var context: Context? = null
private val scope by lazy { CoroutineScope(Dispatchers.Default + SupervisorJob()) }
override fun init(context: Context?) {
this.context = context
}
@@ -137,13 +141,37 @@ class MoGoHmiProvider : IMoGoHmiProvider {
CallerV2XWarningListenerManager.dismiss()
}
Log.d("CODE", "---- 00 ------ tts_content: $ttsContent")
if (ttsContent != null && !TextUtils.isEmpty(ttsContent) && playTTS) {
val last = lastSpeakJob.get()
if (last != null && !last.isCompleted) {
Log.d("CODE", "---- 0 ------: last: $last")
if (last != null && !last.isCompleted) {
Log.d("CODE", "---- 1 ------")
return
}
ProcessLifecycleOwner.get().lifecycleScope.launch(Dispatchers.Main) {
speak(it, ttsContent)
scope.launch {
Log.d("CODE", "---- 2 ------")
val d1 = async {
Log.d("CODE", "---- 2_1 start ------")
speak(it, ttsContent)
Log.d("CODE", "---- 2_1 end ------")
}
val d2 = async {
Log.d("CODE", "---- 2_2 start ------")
delay((305.75 * ttsContent.length).toLong())
Log.d("CODE", "---- 2_2 end ------")
}
val ret = select<Int> {
d1.onAwait { 1 }
d2.onAwait { 2 }
}
if (ret == 1) {
d2.cancel()
Log.d("CODE", "---- 3 ------")
} else {
d1.cancel()
Log.d("CODE", "---- 4 ------")
}
}.also { itx ->
lastSpeakJob.set(itx)
}

View File

@@ -7,6 +7,7 @@ import android.content.ClipboardManager
import android.content.Context
import android.graphics.Color
import android.os.Build
import android.os.Process
import android.text.Html
import android.util.AttributeSet
import android.util.Log
@@ -64,9 +65,7 @@ import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.logcatch.ILogViewListener
import com.mogo.eagle.core.function.hmi.ui.logcatch.LogInfoView
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
import com.mogo.eagle.core.utilcode.kotlin.currentPadding
import com.mogo.eagle.core.utilcode.kotlin.lifecycleOwner
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.kotlin.*
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel
@@ -81,7 +80,7 @@ import com.mogo.map.uicontroller.VisualAngleMode.*
import kotlinx.android.synthetic.main.view_debug_setting.view.*
import kotlinx.android.synthetic.main.view_debug_setting.view.tbRouteDynamicEffect
import kotlinx.android.synthetic.main.view_sop_setting.view.*
import kotlinx.coroutines.launch
import kotlinx.coroutines.*
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
import java.text.SimpleDateFormat
@@ -642,6 +641,18 @@ internal class DebugSettingView @JvmOverloads constructor(
tbIsDemoMode.visibility = View.GONE
}
tbIsStrictMode?.also {
it.isChecked = SharedPrefs.getInstance(Utils.getApp()).getBoolean("MOGO_STRICT_MODE_ENABLED", false)
it.setOnCheckedChangeListener { _, isChecked ->
SharedPrefs.getInstance(Utils.getApp()).putBoolean("MOGO_STRICT_MODE_ENABLED", isChecked)
scope.launch {
ToastUtils.showShort("配置生效, 2秒后重启应用...")
delay(2000)
restartApp()
}
}
}
// 雨天模式,上一次勾选的数据
tbIsRainMode.isChecked = FunctionBuildConfig.isRainMode
//雨天模式
@@ -1651,11 +1662,10 @@ internal class DebugSettingView @JvmOverloads constructor(
mRouteInfoSize = 0
if (FunctionBuildConfig.isDemoMode) {
tbIsDemoMode.text = "关闭美化模式"
tbIsDemoMode?.text = "关闭美化模式"
} else {
tbIsDemoMode.text = "开启美化模式"
tbIsDemoMode?.text = "开启美化模式"
}
//obu信息排查obu相关问题使用
tvObuInfoContent.text = mObuInfoStr
@@ -2058,6 +2068,11 @@ internal class DebugSettingView @JvmOverloads constructor(
}
}
private fun restartApp() {
Utils.getApp().startActivity(Utils.getApp().packageManager.getLaunchIntentForPackage(Utils.getApp().packageName))
Process.killProcess(Process.myPid())
}
override fun fwThreadClose() {
refreshTraceInfo()
}

View File

@@ -230,6 +230,18 @@
android:layout_height="1dp"
android:background="#F0F0F0" />
<ToggleButton
android:id="@+id/tbIsStrictMode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:background="@drawable/radio_button_normal_background_right"
android:textColor="#000"
android:padding="@dimen/dp_20"
android:textOff="开启严格模式"
android:textOn="关闭严格模式"
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbIsDemoMode"
android:layout_width="match_parent"

View File

@@ -12,6 +12,7 @@ import com.mogo.eagle.core.data.deva.scene.SceneModule
import com.mogo.eagle.core.data.deva.scene.SceneTAG
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.function.api.devatools.apm.*
import com.mogo.eagle.core.function.api.devatools.strict.*
/**
* 开发套件工具接口
@@ -195,4 +196,6 @@ interface IDevaToolsProvider : IProvider {
fun dockerVersion(dockerVersion: String?)
fun apmEnvProvider(): IApmEnvProvider
fun strict(): IStrictModeProvider
}

View File

@@ -0,0 +1,10 @@
package com.mogo.eagle.core.function.api.devatools.strict
/**
* 系统严格模式功能封装
*/
interface IStrictModeProvider {
fun enable()
}

View File

@@ -14,6 +14,7 @@ import com.mogo.eagle.core.data.deva.scene.SceneTAG
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
import com.mogo.eagle.core.function.api.devatools.apm.*
import com.mogo.eagle.core.function.api.devatools.strict.*
import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
@@ -248,4 +249,6 @@ object CallerDevaToolsManager {
fun queryObuUpgrade(obuVersionName: String) {
devaToolsProviderApi?.queryObuUpgrade(obuVersionName)
}
fun strict(): IStrictModeProvider? = devaToolsProviderApi?.strict()
}