[M2] 1、视频任务下载问题兼容 2、speed速度加log
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user