Merge branch 'dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0' into 'dev_RoboBus_P_230220_1.0.1'

Dev robobus m1 p app module 1.0.0 230112 1.0.0

See merge request zhjt/AndroidApp/MoGoEagleEye!642
This commit is contained in:
wangmingjun
2023-03-02 13:52:45 +00:00
6 changed files with 46 additions and 60 deletions

View File

@@ -290,11 +290,10 @@ class PM2DrivingModel private constructor() {
PM2ServiceManager.queryDriverSiteByCoordinate(it,
object : OchCommonServiceCallback<PM2RoutesResponse>{
override fun onSuccess(data: PM2RoutesResponse?) {
if (data?.result === routesResult) {
return
}
if (data == null || data.result == null
||data.result.equals(routesResult)) return
if (data?.result?.sites === null) {
if (data.result.sites == null) {
d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate ===== 没有路线")
routesResult = null
mNextStationIndex = 0

View File

@@ -17,7 +17,8 @@ class AdvanceGSYVideoPlayer: StandardGSYVideoPlayer {
init {
hideWidget()
GSYVideoType.setShowType(com.shuyu.gsyvideoplayer.utils.GSYVideoType.SCREEN_MATCH_FULL)
GSYVideoType.setShowType(GSYVideoType.SCREEN_MATCH_FULL)
GSYVideoType.setRenderType(GSYVideoType.GLSURFACE)
}
override fun hideAllWidget() {
@@ -50,19 +51,19 @@ class AdvanceGSYVideoPlayer: StandardGSYVideoPlayer {
}
private fun hideWidget(){
setViewShowState(mBottomContainer, GONE)
setViewShowState(mProgressBar, GONE)
setViewShowState(mCurrentTimeTextView, GONE)
setViewShowState(mTotalTimeTextView, GONE)
setViewShowState(mBottomProgressBar, GONE)
setViewShowState(mBackButton, GONE)
setViewShowState(mStartButton, GONE)
setViewShowState(mBottomContainer, INVISIBLE)
setViewShowState(mProgressBar, INVISIBLE)
setViewShowState(mCurrentTimeTextView, INVISIBLE)
setViewShowState(mTotalTimeTextView, INVISIBLE)
setViewShowState(mBottomProgressBar, INVISIBLE)
setViewShowState(mBackButton, INVISIBLE)
setViewShowState(mStartButton, INVISIBLE)
setViewShowState(mTopContainer, GONE)
setViewShowState(mTopContainer, INVISIBLE)
setViewShowState(mLoadingProgressBar, GONE)
setViewShowState(mLoadingProgressBar, INVISIBLE)
setViewShowState(
mLockScreen, GONE
mLockScreen, INVISIBLE
)
setIsTouchWiget(false)
@@ -75,7 +76,7 @@ class AdvanceGSYVideoPlayer: StandardGSYVideoPlayer {
}
fun setCacheImageViewGone() {
setViewShowState(mThumbImageViewLayout, GONE)
setViewShowState(mThumbImageView, GONE)
setViewShowState(mThumbImageViewLayout, INVISIBLE)
setViewShowState(mThumbImageView, INVISIBLE)
}
}

View File

@@ -5,7 +5,10 @@ import android.view.View
import android.view.ViewGroup
import androidx.viewpager.widget.PagerAdapter
import androidx.viewpager.widget.ViewPager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.util.CountDownTimer
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
/**
@@ -26,7 +29,7 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
private var current = 0
private val time = 5000
private var pause = false
private var thread: Thread? = null
private var countDownTimer: CountDownTimer? = null
fun setData(list: MutableList<RotationItem>) {
if (list.isEmpty()) return
@@ -174,34 +177,21 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
}
private fun startTimer() {
if (null != thread && !thread?.isInterrupted!!) {
Logger.d(ImageAndVideoRotation.TAG, "thread.interrupt()")
thread?.interrupt()
thread = null
if (countDownTimer != null){
countDownTimer?.cancel()
countDownTimer = null
}
thread = Thread {
while (null != thread && !thread?.isInterrupted!!) {
try {
Logger.d(ImageAndVideoRotation.TAG, "sleep")
Thread.sleep(1000)
if (viewList[mViewPager.currentItem] is AdvanceImageView) {
Logger.d(ImageAndVideoRotation.TAG, "增加1s")
current += 1000
}else{
break
}
if (current >= time) {
Logger.d(ImageAndVideoRotation.TAG, "5s到跳转")
goNextItemView()
current = 0
break
}
} catch (e: InterruptedException) {
e.printStackTrace()
}
countDownTimer = object : CountDownTimer(5000,1000){
override fun onTick(millisUntilFinished: Long) {
d(SceneConstant.M_BUS_P + "startTimer", "倒计时秒 = ${millisUntilFinished/1000}" )
}
}
thread?.start()
override fun onFinish() {
d(ImageAndVideoRotation.TAG+ "startTimer", "5s到跳转")
goNextItemView()
}
}.start()
}
/**

View File

@@ -14,6 +14,7 @@ import com.mogo.eagle.core.utilcode.breakpoint.utils.DownloadUtils
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.eagle.core.utilcode.util.BitmapHelper
import com.mogo.eagle.core.utilcode.util.FileUtils
import com.mogo.eagle.core.utilcode.util.ThreadPoolService
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.och.bus.passenger.R
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
@@ -87,7 +88,7 @@ class AdvanceVideoView @JvmOverloads constructor(
// BitmapHelper.getVideoThumbnail(path) /*获取第一帧图*/
cacheImage?.setImageResource(R.drawable.m2_p_video_holder)
setCacheImageViewVisible()
Thread {
ThreadPoolService.execute {
var bitmap = BitmapHelper.getVideoThumbnail(fileNetPath)
Logger.d(ImageAndVideoRotation.TAG, "setVideoPath")
ThreadUtils.runOnUiThread {
@@ -103,19 +104,7 @@ class AdvanceVideoView @JvmOverloads constructor(
.into(it)
}
}
}.start()
// Logger.d(ImageAndVideoRotation.TAG, "bitmap加载")
// cacheImage?.let {
// Glide.with(context).load(cacheImageUrl)
// .apply(
// RequestOptions().placeholder(R.drawable.m2_p_video_holder)
// .error(R.drawable.m2_p_video_holder)
// .fallback(R.drawable.m2_p_video_holder)
// .centerCrop()
// )
// .into(it)
// }
// videoViewPlayer?.thumbImageView = cacheImage
}
}
fun clearLocalErrorVideo(){

View File

@@ -21,7 +21,7 @@ public class MarqueeTextView extends androidx.appcompat.widget.AppCompatTextView
/**
* 自定义 gap
*/
private float mCustomGap = 0.3f;
private float mCustomGap = 0.5f;
/**
* 是否使用自定义 gap
*/

View File

@@ -91,10 +91,17 @@ object ConfigStartUp {
HdMapBuildConfig.currentCarVrIconRes = R.raw.huanwei
} else if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)){
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
} else if (AppIdentityModeUtils.isM1(FunctionBuildConfig.appIdentityMode)){
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
} else if (AppIdentityModeUtils.isM2(FunctionBuildConfig.appIdentityMode)){
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
}
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) ||
AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)
|| AppIdentityModeUtils.isM1(FunctionBuildConfig.appIdentityMode) ||
AppIdentityModeUtils.isM2(FunctionBuildConfig.appIdentityMode)) {
//是否显示 限速UI
HmiBuildConfig.isShowLimitingVelocityView = false
//白天模式