[6.6.0]接管记录次日清空逻辑

This commit is contained in:
xuxinchao
2024-08-26 18:05:18 +08:00
parent f5e4bd6f6a
commit bff69f39f4

View File

@@ -43,6 +43,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapScreenListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.call.takeover.CallerTakeOverManager
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.scene.SceneConstant.Companion.M_DEVA
@@ -89,13 +90,13 @@ internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordLis
// 云socket连接状态
MogoStatusManager.getInstance()
.registerStatusChangedListener(TAG, StatusDescriptor.CLOUD_SOCKET, this)
checkDelete()
checkDelete(context)
}
/**
* 检查删除录包记录在本地的信息
*/
private fun checkDelete(){
private fun checkDelete(context: Context){
//获取当天时间
val currentDay = millis2String(System.currentTimeMillis(), TimeUtils.getMdFormat())
//和上次启动时间做对比,如果不是一天,则判断主动、采集和录包失败列表数量,数量过多的时候进行清除
@@ -110,6 +111,8 @@ internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordLis
BadCaseConfig.getRecordFailSet().clear()
}
BadCaseConfig.setStartTime(currentDay)
//删除前一天的接管记录
CallerTakeOverManager.deleteAllRecord(context)
}
}