rebase
This commit is contained in:
@@ -5,12 +5,12 @@ import android.content.Context
|
||||
import android.view.View
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.BadCaseManager
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchManager
|
||||
import com.zhjt.mogo_core_function_devatools.trace.TraceManager.Companion.traceManager
|
||||
import record_cache.RecordPanelOuterClass
|
||||
|
||||
@Route(path = MogoServicePaths.PATH_DEVA_TOOLS)
|
||||
class DevaToolsProvider : IDevaToolsProvider {
|
||||
@@ -52,7 +52,7 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
BadCaseManager.init(view, onShow, onHide)
|
||||
}
|
||||
|
||||
override fun onReceiveBadCaseRecord(record: AutoPilotRecordResult) {
|
||||
override fun onReceiveBadCaseRecord(record: RecordPanelOuterClass.RecordPanel) {
|
||||
BadCaseManager.onReceiveBadCaseRecord(record)
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import androidx.lifecycle.LifecycleEventObserver
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifecycleOwner
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
@@ -24,6 +23,7 @@ import com.zhjt.mogo_core_function_devatools.badcase.mvp.BadCaseView
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.repository.db.entity.AutoPilotRecord
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.channels.Channel
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import java.lang.ref.WeakReference
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
@@ -164,7 +164,7 @@ internal object BadCaseManager : LifecycleEventObserver {
|
||||
return oldT == 0L || newT == 0L || (newT - oldT >= 0 && (newT - oldT) < CASE_EXPIRE_DURATION)
|
||||
}
|
||||
|
||||
fun onReceiveBadCaseRecord(record: AutoPilotRecordResult) {
|
||||
fun onReceiveBadCaseRecord(record: RecordPanelOuterClass.RecordPanel) {
|
||||
scope?.launch {
|
||||
val newRecord = record.toRecord()
|
||||
withContext(Dispatchers.IO) {
|
||||
@@ -267,15 +267,15 @@ fun <T: View> T.toggle(show: Boolean) {
|
||||
}
|
||||
}
|
||||
|
||||
internal fun AutoPilotRecordResult.toRecord(): AutoPilotRecord = AutoPilotRecord().also {
|
||||
internal fun RecordPanelOuterClass.RecordPanel.toRecord(): AutoPilotRecord = AutoPilotRecord().also {
|
||||
it.id = this.id
|
||||
it.stat = this.stat
|
||||
it.key = this.key
|
||||
it.key = this.key.toString()
|
||||
it.note = this.note
|
||||
it.type = this.type
|
||||
it.total = this.total
|
||||
it.fileName = this.fileName
|
||||
it.duration = this.duration
|
||||
it.total = this.totalSize
|
||||
it.fileName = this.filename
|
||||
it.duration = this.duration.toDouble()
|
||||
it.diskFree = this.diskFree
|
||||
it.consumed = false
|
||||
}
|
||||
@@ -170,7 +170,6 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
Logger.init(LogLevel.DEBUG)
|
||||
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowDebugLog = true
|
||||
CallerAutoPilotManager.setEnableLog(true)
|
||||
CallerAutoPilotManager.setIsWriteLog(true)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -181,7 +180,6 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
Logger.init(if (DebugConfig.isDebug()) LogLevel.DEBUG else LogLevel.OFF)
|
||||
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowDebugLog = false
|
||||
CallerAutoPilotManager.setEnableLog(false)
|
||||
CallerAutoPilotManager.setIsWriteLog(false)
|
||||
}
|
||||
|
||||
override fun onError(errorCount: Int) {
|
||||
|
||||
Reference in New Issue
Block a user