From ccecb1948f3c62421ad87d2489ba46e8932250f5 Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Thu, 9 Mar 2023 22:42:02 +0800 Subject: [PATCH] =?UTF-8?q?[M2]=201=E3=80=81=E8=A7=86=E9=A2=91=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E4=B8=8B=E8=BD=BD=E9=97=AE=E9=A2=98=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=202=E3=80=81speed=E9=80=9F=E5=BA=A6=E5=8A=A0log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../passenger/presenter/PM2DrivingPresenter.kt | 5 +++++ .../passenger/ui/widget/video/AdvanceVideoView.kt | 15 +++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/presenter/PM2DrivingPresenter.kt b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/presenter/PM2DrivingPresenter.kt index bd0e8328e2..ff313f10a2 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/presenter/PM2DrivingPresenter.kt +++ b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/presenter/PM2DrivingPresenter.kt @@ -2,6 +2,8 @@ package com.mogo.och.bus.passenger.presenter import androidx.lifecycle.LifecycleOwner import com.mogo.commons.mvp.Presenter +import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger +import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.och.bus.passenger.bean.PM2Station import com.mogo.och.bus.passenger.callback.AutoPilotStatusCallback @@ -36,6 +38,9 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) : } override fun updateSpeed(speed: Int) { + CallerLogger.d( + SceneConstant.M_BUS_P + "speed = ",speed.toString() + ) ThreadUtils.runOnUiThread { mView?.updateSpeed(speed) } diff --git a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceVideoView.kt b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceVideoView.kt index e648e9660a..5ff5e7feab 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceVideoView.kt +++ b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceVideoView.kt @@ -208,14 +208,21 @@ class AdvanceVideoView @JvmOverloads constructor( override fun onFinished(url: String?, threadBean: ThreadBean?) { Logger.d(ImageAndVideoRotation.TAG, "download-onFinished = $url") - if (url.equals(fileNetPath)){ //发现下载工具在断网又连网后,任务又都排队下载,跳转播放出现问题 + if (url.equals(fileNetPath)){ //发现下载工具在断网又连网后,已完成的任务又都下载,跳转播放出现问题 //下载完成 ThreadUtils.runOnUiThread { startPlay() } - }else{//再次去下载当前的 - startDownLoadVideo() - Logger.d(ImageAndVideoRotation.TAG, "download-onFinished = not current video") + }else{//如果当前文件不存在再次去下载当前的 + Logger.d(ImageAndVideoRotation.TAG, "download-onFinished = not current" + + ",currentUrl = $fileNetPath ") + if (FileUtils.isFileExists(mVideoDirPath+downloadVideoName)){ + Logger.d(ImageAndVideoRotation.TAG, "have download startPlay") + startPlay() + return + }else{ + startDownLoadVideo() + } } }