diff --git a/core/function-impl/mogo-core-function-hmi/build.gradle b/core/function-impl/mogo-core-function-hmi/build.gradle
index 23dd91a810..86b8c9334c 100644
--- a/core/function-impl/mogo-core-function-hmi/build.gradle
+++ b/core/function-impl/mogo-core-function-hmi/build.gradle
@@ -103,7 +103,7 @@ dependencies {
api rootProject.ext.dependencies.mogo_core_function_api
implementation project(':libraries:map-usbcamera')
-
+ implementation project(':libraries:mogo-adas-other')
} else {
api project(':foudations:mogo-aicloud-services-sdk')
api project(':foudations:mogo-commons')
@@ -137,6 +137,7 @@ dependencies {
api project(':core:mogo-core-function-api')
api project(':libraries:map-usbcamera')
+ api project(':libraries:mogo-adas-other')
}
}
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
index eba6becd36..64f092393d 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
@@ -6,7 +6,6 @@ import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.graphics.Color
-import android.media.RingtoneManager
import android.os.Build
import android.text.Html
import android.util.AttributeSet
@@ -65,8 +64,8 @@ import com.mogo.map.MogoMap
import com.mogo.map.uicontroller.VisualAngleMode
import com.mogo.map.uicontroller.VisualAngleMode.*
import com.mogo.module.service.routeoverlay.*
-import com.tencent.liteav.basic.datareport.a.B
import com.zhidao.easysocket.utils.L
+import com.zhidao.support.adas.high.other.permission.BackgrounderPermission
import kotlinx.android.synthetic.main.view_debug_setting.view.*
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
@@ -74,6 +73,7 @@ import java.text.SimpleDateFormat
import java.util.*
import kotlin.math.abs
+
/**
* @author xiaoyuzhou
* @date 2021/9/30 8:46 下午
@@ -741,6 +741,23 @@ class DebugSettingView @JvmOverloads constructor(
ToastUtils.showLong("经纬度复制成功")
}
+ //状态中心-后台优化状态
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
+ val backgroundStatus = "后台运行:" + if (BackgrounderPermission.getInstance()
+ .isPermissionLongBackgroundRunning(context)
+ ) "已优化" else "未优化"
+ tvBackgroundOperation.text = Html.fromHtml(backgroundStatus, Html.FROM_HTML_MODE_LEGACY)
+ tvBackgroundOperation.setOnClickListener {
+ BackgrounderPermission.getInstance().showPermissionLongBackgroundRunningDialog(context)
+ }
+ BackgrounderPermission.getInstance().setListener {
+ val str =
+ "后台运行:" + if (it) "已优化" else "未优化"
+ tvBackgroundOperation.text = Html.fromHtml(str, Html.FROM_HTML_MODE_LEGACY)
+ }
+ }else {
+ tvBackgroundOperation.visibility = GONE
+ }
}
/**
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
index 41e399344a..2e71aef998 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
@@ -561,6 +561,18 @@
android:layout_height="1dp"
android:background="#F0F0F0" />
+
+
+
+
+