调试窗
状态中心增加后台运行是否优化状态以及设置入口
This commit is contained in:
@@ -103,7 +103,7 @@ dependencies {
|
|||||||
api rootProject.ext.dependencies.mogo_core_function_api
|
api rootProject.ext.dependencies.mogo_core_function_api
|
||||||
|
|
||||||
implementation project(':libraries:map-usbcamera')
|
implementation project(':libraries:map-usbcamera')
|
||||||
|
implementation project(':libraries:mogo-adas-other')
|
||||||
} else {
|
} else {
|
||||||
api project(':foudations:mogo-aicloud-services-sdk')
|
api project(':foudations:mogo-aicloud-services-sdk')
|
||||||
api project(':foudations:mogo-commons')
|
api project(':foudations:mogo-commons')
|
||||||
@@ -137,6 +137,7 @@ dependencies {
|
|||||||
api project(':core:mogo-core-function-api')
|
api project(':core:mogo-core-function-api')
|
||||||
|
|
||||||
api project(':libraries:map-usbcamera')
|
api project(':libraries:map-usbcamera')
|
||||||
|
api project(':libraries:mogo-adas-other')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import android.content.ClipData
|
|||||||
import android.content.ClipboardManager
|
import android.content.ClipboardManager
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.media.RingtoneManager
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.text.Html
|
import android.text.Html
|
||||||
import android.util.AttributeSet
|
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.map.uicontroller.VisualAngleMode.*
|
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||||
import com.mogo.module.service.routeoverlay.*
|
import com.mogo.module.service.routeoverlay.*
|
||||||
import com.tencent.liteav.basic.datareport.a.B
|
|
||||||
import com.zhidao.easysocket.utils.L
|
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 kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||||
import mogo.telematics.pad.MessagePad
|
import mogo.telematics.pad.MessagePad
|
||||||
import mogo_msg.MogoReportMsg
|
import mogo_msg.MogoReportMsg
|
||||||
@@ -74,6 +73,7 @@ import java.text.SimpleDateFormat
|
|||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author xiaoyuzhou
|
* @author xiaoyuzhou
|
||||||
* @date 2021/9/30 8:46 下午
|
* @date 2021/9/30 8:46 下午
|
||||||
@@ -741,6 +741,23 @@ class DebugSettingView @JvmOverloads constructor(
|
|||||||
ToastUtils.showLong("经纬度复制成功")
|
ToastUtils.showLong("经纬度复制成功")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//状态中心-后台优化状态
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
|
||||||
|
val backgroundStatus = "后台运行:" + if (BackgrounderPermission.getInstance()
|
||||||
|
.isPermissionLongBackgroundRunning(context)
|
||||||
|
) "<font color='green'>已优化</font>" else "<font color='red'>未优化</font>"
|
||||||
|
tvBackgroundOperation.text = Html.fromHtml(backgroundStatus, Html.FROM_HTML_MODE_LEGACY)
|
||||||
|
tvBackgroundOperation.setOnClickListener {
|
||||||
|
BackgrounderPermission.getInstance().showPermissionLongBackgroundRunningDialog(context)
|
||||||
|
}
|
||||||
|
BackgrounderPermission.getInstance().setListener {
|
||||||
|
val str =
|
||||||
|
"后台运行:" + if (it) "<font color='green'>已优化</font>" else "<font color='red'>未优化</font>"
|
||||||
|
tvBackgroundOperation.text = Html.fromHtml(str, Html.FROM_HTML_MODE_LEGACY)
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
tvBackgroundOperation.visibility = GONE
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -561,6 +561,18 @@
|
|||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="#F0F0F0" />
|
android:background="#F0F0F0" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvBackgroundOperation"
|
||||||
|
style="@style/DebugSettingText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#F0F0F0" />
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
|
|||||||
Reference in New Issue
Block a user