diff --git a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt index 47ca090794..a9abc4ee54 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt +++ b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt @@ -46,8 +46,9 @@ class PM2DrivingInfoFragment : } override fun initViews() { - speed_tv.onClick { - context?.let { it -> ToggleDebugView.toggleDebugView.toggle(it) } + speed_tv.setOnLongClickListener { + context?.let { ToggleDebugView.toggleDebugView.toggle(it) } + true } line_name_tv.setTextColor(resources.getColor(R.color.m2_line_name_tv_color)) diff --git a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/video/PM2VideoFragment.kt b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/video/PM2VideoFragment.kt index 51ecb3f221..6eee9039d4 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/video/PM2VideoFragment.kt +++ b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/video/PM2VideoFragment.kt @@ -51,83 +51,184 @@ class PM2VideoFragment : arrayListOf.clear() arrayListOf.add( RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", - 0, + "https://img.zhidaohulian.com/fileServer/online_car_hailing/1678946244305/dalim2.mp4", + 1, "", "1" ) ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", - 0, - "", - "2" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4", - 1, - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", - "3" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", - 0, - "", - "4" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", - 1, - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", - "5" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v", - 1, - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", - "6" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg", - 0, - "", - "7" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg", - 0, - "", - "8" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", - 0, - "", - "9" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4", - 1, - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", - "10" - ) - ) - } +// if (BuildConfig.FLAVOR.contains("dali")){ //大理 目前还都使用的mogo 的cos https://img.zhidaohulian.com/fileServer/online_car_hailing/1678932482045/1080%2A565%20.mp4 +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1678932482045/1080%2A565%20.mp4", +// 1, +// "", +// "1" +// ) +// ) +// }else if (BuildConfig.FLAVOR.contains("yantai")){ //烟台 +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", +// 0, +// "", +// "1" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", +// 0, +// "", +// "2" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4", +// 1, +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", +// "3" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", +// 0, +// "", +// "4" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", +// 1, +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", +// "5" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v", +// 1, +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", +// "6" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg", +// 0, +// "", +// "7" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg", +// 0, +// "", +// "8" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", +// 0, +// "", +// "9" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4", +// 1, +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", +// "10" +// ) +// ) +// }else{ // mogo +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", +// 0, +// "", +// "1" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", +// 0, +// "", +// "2" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4", +// 1, +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", +// "3" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", +// 0, +// "", +// "4" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", +// 1, +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", +// "5" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v", +// 1, +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", +// "6" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg", +// 0, +// "", +// "7" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg", +// 0, +// "", +// "8" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", +// 0, +// "", +// "9" +// ) +// ) +// arrayListOf.add( +// RotationItem( +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4", +// 1, +// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", +// "10" +// ) +// ) +// } +// + } } \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvancePagerAdapter.kt b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvancePagerAdapter.kt index ebe522c6e0..db42808e75 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvancePagerAdapter.kt +++ b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvancePagerAdapter.kt @@ -148,21 +148,18 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter override fun onPrepared(url: String?, vararg objects: Any?) { Logger.d(ImageAndVideoRotation.TAG, "onPrepared--$url") -// if (viewList[mViewPager.currentItem] is AdvanceVideoView){ -// val videoView = (viewList[mViewPager.currentItem] as AdvanceVideoView) -// UiThreadHandler.postDelayed(Runnable { -// videoView.setCacheImageViewGone() -// },1000) -// } } override fun onAutoComplete(url: String?, vararg objects: Any?) { Logger.d(ImageAndVideoRotation.TAG, "onAutoComplete()-$url") if (viewList[mViewPager.currentItem] is AdvanceVideoView){ val videoView = (viewList[mViewPager.currentItem] as AdvanceVideoView) - videoView.onVideoReset() -// videoView.setCacheImageViewVisible() - goNextItemView() + if (viewList.size == 1){ + videoView.startPlay(url) + }else{ + videoView.onVideoReset() + goNextItemView() + } } } 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 92701d437f..29a678e59a 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 @@ -142,7 +142,7 @@ class AdvanceVideoView @JvmOverloads constructor( ) if (FileUtils.isFileExists(mVideoDirPath+downloadVideoName)){ Logger.d(ImageAndVideoRotation.TAG, "have cache startPlay") - startPlay() + startPlay(Uri.fromFile(File(mVideoDirPath+downloadVideoName)).toString()) return } startDownLoadVideo() @@ -157,13 +157,14 @@ class AdvanceVideoView @JvmOverloads constructor( ,downloadVideoName,5,downListener) } - private fun startPlay(){ + fun startPlay(localVideoPath: String?){ + if (localVideoPath === "") return try { Logger.d(ImageAndVideoRotation.TAG, "startPlay") gsyVideoOptionBuilder = GSYVideoOptionBuilder() gsyVideoOptionBuilder // ?.setUrl("file:///mnt/sdcard/downloads/$downloadVideoName") - ?.setUrl(Uri.fromFile(File(mVideoDirPath+downloadVideoName)).toString()) // "/data/user/0/com.mogo.launcher.f/files/video/" + ?.setUrl(localVideoPath) // "/data/user/0/com.mogo.launcher.f/files/video/" ?.setPlayTag(downloadVideoName) ?.setCacheWithPlay(false) ?.setThumbPlay(false) @@ -217,7 +218,7 @@ class AdvanceVideoView @JvmOverloads constructor( if (url.equals(fileNetPath)){ //发现下载工具在断网又连网后,已完成的任务又都下载,跳转播放出现问题 //下载完成 ThreadUtils.runOnUiThread { - startPlay() + startPlay(Uri.fromFile(File(mVideoDirPath+downloadVideoName)).toString()) } }else{//如果当前文件不存在再次去下载当前的 Logger.d(ImageAndVideoRotation.TAG, "download-onFinished = not current" + @@ -225,7 +226,7 @@ class AdvanceVideoView @JvmOverloads constructor( if (FileUtils.isFileExists(mVideoDirPath+downloadVideoName)){ Logger.d(ImageAndVideoRotation.TAG, "have download startPlay") ThreadUtils.runOnUiThread { - startPlay() + startPlay(Uri.fromFile(File(mVideoDirPath+downloadVideoName)).toString()) } return }else{ diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerView.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerView.kt index a09649ff3d..bd43556851 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerView.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerView.kt @@ -141,7 +141,7 @@ class AdvanceVideoView @JvmOverloads constructor( ) if (FileUtils.isFileExists(mVideoDirPath + downloadVideoName)) { Logger.d(ImageVideoRotationView.TAG, "have cache startPlay") - startPlay() + startPlay(Uri.fromFile(File(mVideoDirPath + downloadVideoName)).toString()) return } startDownLoadVideo() @@ -157,13 +157,13 @@ class AdvanceVideoView @JvmOverloads constructor( ) } - private fun startPlay() { + fun startPlay(localVideoPath: String?) { try { Logger.d(ImageVideoRotationView.TAG, "startPlay") gsyVideoOptionBuilder = GSYVideoOptionBuilder() gsyVideoOptionBuilder ?.setUrl( - Uri.fromFile(File(mVideoDirPath + downloadVideoName)).toString() + localVideoPath ) // "/data/user/0/com.mogo.launcher.f/files/video/" ?.setPlayTag(downloadVideoName) ?.setCacheWithPlay(false) @@ -218,7 +218,7 @@ class AdvanceVideoView @JvmOverloads constructor( if (url.equals(fileNetPath)) { //发现下载工具在断网又连网后,已完成的任务又都下载,跳转播放出现问题 //下载完成 ThreadUtils.runOnUiThread { - startPlay() + startPlay(Uri.fromFile(File(mVideoDirPath + downloadVideoName)).toString()) } } else {//如果当前文件不存在再次去下载当前的 Logger.d( @@ -228,7 +228,7 @@ class AdvanceVideoView @JvmOverloads constructor( if (FileUtils.isFileExists(mVideoDirPath + downloadVideoName)) { Logger.d(ImageVideoRotationView.TAG, "have download startPlay") ThreadUtils.runOnUiThread { - startPlay() + startPlay(Uri.fromFile(File(mVideoDirPath + downloadVideoName)).toString()) } return } else { @@ -398,8 +398,12 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter if (viewList[mViewPager.currentItem] is AdvanceVideoView) { val videoView = (viewList[mViewPager.currentItem] as AdvanceVideoView) videoView.onVideoReset() -// videoView.setCacheImageViewVisible() - goNextItemView() + if (viewList.size == 1){ + videoView.startPlay(url) + }else{ + goNextItemView() + + } } } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt index 0a181f91dc..b962f802a5 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt @@ -1601,10 +1601,12 @@ internal class DebugSettingView @JvmOverloads constructor( }" ) - val autopilotJson = GsonUtils.toJson(mAutoPilotStatusInfo) - tvAutopilotInfo.text = autopilotJson - tvIpcInfo.text = autopilotJson - tvIpcInfoKey.text = autopilotJson + mAutoPilotStatusInfo?.let { + val autopilotJson = GsonUtils.toJson(it) + tvAutopilotInfo.text = autopilotJson + tvIpcInfo.text = autopilotJson + tvIpcInfoKey.text = autopilotJson + } tvCmdbCarInfoContent.text = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.CAR_INFO)?:"" tvCarInfo.text = diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/OverMapView.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/OverMapView.kt index e3fb3283e0..3cef39a6a1 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/OverMapView.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/OverMapView.kt @@ -261,7 +261,7 @@ class OverMapView @JvmOverloads constructor( CallerPlanningRottingListenerManager.addListener(TAG, this) initAMapView(context) // 注册定位监听 - CallerChassisLocationGCJ02ListenerManager.addListener(TAG, 20, this) + CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this) //设置全览模式 overLayerView?.setOnClickListener { displayCustomOverView() } overLayerView?.let { diff --git a/gradle.properties b/gradle.properties index b417f92818..6be651f447 100644 --- a/gradle.properties +++ b/gradle.properties @@ -66,23 +66,23 @@ SERVICE_BIZ_VERSION=1.2.4 LOGLIB_VERSION=1.5.11 ######## MogoAiCloudSDK Version ######## # 网络请求LOGLIB_VERSION -MOGO_NETWORK_VERSION=1.4.5.10 +MOGO_NETWORK_VERSION=1.4.5.12 # 鉴权 -MOGO_PASSPORT_VERSION=1.4.5.10 +MOGO_PASSPORT_VERSION=1.4.5.12 # 常链接 -MOGO_SOCKET_VERSION=1.4.5.10 +MOGO_SOCKET_VERSION=1.4.5.12 # 数据采集 -MOGO_REALTIME_VERSION=1.4.5.10 +MOGO_REALTIME_VERSION=1.4.5.12 # 探路,道路事件发布,获取 -MOGO_TANLU_VERSION=1.4.5.10 +MOGO_TANLU_VERSION=1.4.5.12 # 直播推流 -MOGO_LIVE_VERSION=1.4.5.10 +MOGO_LIVE_VERSION=1.4.5.12 # 直播拉流 -MOGO_TRAFFICLIVE_VERSION=1.4.5.10 +MOGO_TRAFFICLIVE_VERSION=1.4.5.12 # 定位服务 -MOGO_LOCATION_VERSION=1.4.5.10 +MOGO_LOCATION_VERSION=1.4.5.12 # 远程通讯模块 -MOGO_TELEMATIC_VERSION=1.4.5.10 +MOGO_TELEMATIC_VERSION=1.4.5.12 ######## MogoAiCloudSDK Version ######## # 自研地图 MAP_SDK_VERSION=2.10.0.9