Merge branch 'dev_robobus_network_weak_230323' into dev_robobus-p_230322_2.0.0
This commit is contained in:
@@ -9,5 +9,5 @@
|
||||
<string name="bus_p_cur_next_station_title">下一站:</string>
|
||||
<string name="bus_p_cur_station_title_init">始发站:</string>
|
||||
<string name="bus_p_cur_station_arrived_tip">请携带好随身物品下车。</string>
|
||||
<string name="bus_p_cur_station_arrived_tip_init">欢迎乘坐蘑菇车联自动驾驶车。</string>
|
||||
<string name="bus_p_cur_station_arrived_tip_init">欢迎乘坐\'蘑菇车联\'自动驾驶车。</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.mogo.och.common.module.wigets.video
|
||||
|
||||
data class AdsDatas(val ads:MutableList<RotationItem>)
|
||||
|
||||
data class RotationItem(
|
||||
var path: String,
|
||||
var type: Int,
|
||||
var cacheImgPath: String,
|
||||
var title: String
|
||||
)
|
||||
@@ -2,7 +2,6 @@ package com.mogo.och.common.module.wigets.video
|
||||
|
||||
import AdvancePagerAdapter
|
||||
import AdvanceViewPager
|
||||
import RotationItem
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.mogo.och.common.module.wigets.video
|
||||
|
||||
import RotationItem
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.commons.mvp.Presenter
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.och.common.module.R
|
||||
import kotlinx.android.synthetic.main.fragment_video_player.*
|
||||
|
||||
@@ -47,87 +49,12 @@ class VideoPlayerFragment :
|
||||
}
|
||||
|
||||
private fun initResourceData() {
|
||||
arrayListOf.clear()
|
||||
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"
|
||||
)
|
||||
)
|
||||
try {
|
||||
arrayListOf.clear()
|
||||
var datas: AdsDatas = GsonUtils.fromJson(FunctionBuildConfig.tempConfig,object : TypeToken<AdsDatas>() {}.type)
|
||||
arrayListOf.addAll(datas.ads)
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.common.module.R
|
||||
import com.mogo.och.common.module.wigets.video.ImageVideoRotationView
|
||||
import com.mogo.och.common.module.wigets.video.RotationItem
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
|
||||
import com.shuyu.gsyvideoplayer.utils.Debuger
|
||||
@@ -456,13 +457,6 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
|
||||
}
|
||||
}
|
||||
|
||||
data class RotationItem(
|
||||
var path: String,
|
||||
var type: Int,
|
||||
var cacheImgPath: String,
|
||||
var title: String
|
||||
)
|
||||
|
||||
class AdvanceImageView @JvmOverloads constructor(
|
||||
context: Context, attrs: AttributeSet? = null
|
||||
) : RelativeLayout(context, attrs) {
|
||||
|
||||
@@ -86,7 +86,7 @@ class PM2DrivingInfoFragment :
|
||||
super.initViews(savedInstanceState)
|
||||
overMapView?.let {
|
||||
it.onCreateView(savedInstanceState)
|
||||
val radius = AutoSizeUtils.dp2px(requireContext(), 38f)
|
||||
val radius = AutoSizeUtils.dp2px(requireContext(), 16f)
|
||||
it.outlineProvider = TextureVideoViewOutlineProvider(radius.toFloat())
|
||||
it.clipToOutline = true
|
||||
}
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
package com.mogo.och.bus.passenger.ui.video
|
||||
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.presenter.PM2VideoPresenter
|
||||
import com.mogo.och.bus.passenger.ui.widget.video.RotationItem
|
||||
import com.mogo.och.common.module.wigets.video.AdsDatas
|
||||
import com.mogo.och.common.module.wigets.video.RotationItem
|
||||
import kotlinx.android.synthetic.m2.p_m2_video_fragment.*
|
||||
|
||||
/**
|
||||
@@ -48,187 +52,13 @@ class PM2VideoFragment :
|
||||
}
|
||||
|
||||
private fun initResourceData() {
|
||||
arrayListOf.clear()
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1678946244305/dalim2.mp4",
|
||||
1,
|
||||
"",
|
||||
"1"
|
||||
)
|
||||
)
|
||||
// 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"
|
||||
// )
|
||||
// )
|
||||
// }
|
||||
//
|
||||
|
||||
try {
|
||||
arrayListOf.clear()
|
||||
var datas: AdsDatas = GsonUtils.fromJson(FunctionBuildConfig.tempConfig,object : TypeToken<AdsDatas>() {}.type)
|
||||
arrayListOf.addAll(datas.ads)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,10 @@ import android.content.Context
|
||||
import android.media.AudioManager
|
||||
import android.util.AttributeSet
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.shuyu.gsyvideoplayer.utils.Debuger
|
||||
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
@@ -20,7 +21,7 @@ class AdvanceGSYVideoPlayer: StandardGSYVideoPlayer {
|
||||
init {
|
||||
hideWidget()
|
||||
GSYVideoType.setShowType(GSYVideoType.SCREEN_MATCH_FULL)
|
||||
GSYVideoType.setRenderType(GSYVideoType.GLSURFACE)
|
||||
//GSYVideoType.setRenderType(GSYVideoType.GLSURFACE)
|
||||
}
|
||||
|
||||
override fun hideAllWidget() {
|
||||
@@ -124,4 +125,13 @@ class AdvanceGSYVideoPlayer: StandardGSYVideoPlayer {
|
||||
private fun setNeedMute(isMute: Boolean){
|
||||
gsyVideoManager?.player?.setNeedMute(isMute)
|
||||
}
|
||||
|
||||
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
|
||||
super.onSizeChanged(w, h, oldw, oldh)
|
||||
if (!mIfCurrentIsFullscreen) {
|
||||
val dp2px = AutoSizeUtils.dp2px(context, 16f)
|
||||
this.outlineProvider = TextureVideoViewOutlineProvider(dp2px.toFloat())
|
||||
this.clipToOutline = true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ 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.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.common.module.wigets.video.RotationItem
|
||||
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,9 +13,11 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.FileUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
@@ -68,6 +70,9 @@ class AdvanceVideoView @JvmOverloads constructor(
|
||||
layoutParams.addRule(ALIGN_PARENT_RIGHT)
|
||||
layoutParams.addRule(ALIGN_PARENT_TOP)
|
||||
layoutParams.addRule(ALIGN_PARENT_BOTTOM)
|
||||
val dp2px = AutoSizeUtils.dp2px(context, 16f)
|
||||
videoRelativeLayout?.outlineProvider = TextureVideoViewOutlineProvider(dp2px.toFloat())
|
||||
videoRelativeLayout?.clipToOutline = true
|
||||
|
||||
videoRelativeLayout?.addView(videoViewPlayer, layoutParams)
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.widget.RelativeLayout
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import com.mogo.och.common.module.wigets.video.RotationItem
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/2/6
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.mogo.och.bus.passenger.ui.widget.video
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/2/6
|
||||
* type:0 图片
|
||||
* type:1 视频
|
||||
*/
|
||||
data class RotationItem(var path: String,
|
||||
var type: Int,
|
||||
var cacheImgPath: String,
|
||||
var title: String)
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:bottomLeftRadius="@dimen/dp_38"
|
||||
android:topLeftRadius="@dimen/dp_38"/>
|
||||
<corners android:bottomLeftRadius="@dimen/dp_16"
|
||||
android:topLeftRadius="@dimen/dp_16"/>
|
||||
<gradient android:startColor="@android:color/white"
|
||||
android:endColor="@color/shuttle_color_c8efff"
|
||||
android:angle="315"
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
android:layout_marginTop="@dimen/dp_61"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
app:blurRadius="@dimen/dp_20"
|
||||
app:blurRadius="@dimen/dp_15"
|
||||
app:shadowColor="#80000000"
|
||||
app:shadowRadius="@dimen/dp_38"
|
||||
app:shadowRadius="@dimen/dp_16"
|
||||
app:shadow_position="outer"
|
||||
app:xOffset="0dp"
|
||||
app:yOffset="0dp"/>
|
||||
@@ -54,27 +54,44 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/driving_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_480"
|
||||
android:layout_marginStart="@dimen/dp_35"
|
||||
android:layout_marginEnd="@dimen/dp_35"
|
||||
android:layout_height="@dimen/dp_490"
|
||||
app:layout_constraintTop_toTopOf="@+id/och_shadow_layout"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/och_shadow_layout"
|
||||
app:layout_constraintEnd_toEndOf="@+id/och_shadow_layout"
|
||||
app:layout_constraintStart_toStartOf="@+id/och_shadow_layout"/>
|
||||
|
||||
<!-- 消息盒子气泡-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.MBoxBubbleView
|
||||
android:id="@+id/box_bubble_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/och_shadow_layout"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginLeft="@dimen/dp_42"/>
|
||||
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
android:id="@+id/pnc_actions_view"
|
||||
android:layout_width="@dimen/dp_231"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
app:layout_constraintBottom_toTopOf="@+id/video_fragment"
|
||||
android:layout_marginBottom="@dimen/dp_25"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:background_resource="@drawable/bg_pnc" />
|
||||
|
||||
<!-- 图片或视频广告-->
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/video_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:paddingBottom="@dimen/dp_40"
|
||||
android:paddingEnd="@dimen/dp_40"
|
||||
android:paddingStart="@dimen/dp_40"
|
||||
app:layout_constraintHeight_percent="0.290"
|
||||
android:layout_height="@dimen/dp_560"
|
||||
android:layout_marginBottom="@dimen/dp_44"
|
||||
android:layout_marginEnd="@dimen/dp_42"
|
||||
android:layout_marginStart="@dimen/dp_42"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
|
||||
@@ -11,24 +11,4 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<!-- 消息盒子气泡-->
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.MBoxBubbleView
|
||||
android:id="@+id/box_bubble_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginLeft="@dimen/dp_26"/>
|
||||
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
android:id="@+id/pnc_actions_view"
|
||||
android:layout_width="@dimen/dp_231"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:background_resource="@drawable/bg_pnc" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -228,15 +228,18 @@ android {
|
||||
mogo {
|
||||
dimension "project"
|
||||
buildConfigField 'String', 'URLs', "\"${readFileToJson("mogo").replace("\"", "\\\"")}\""
|
||||
buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("mogo").replace("\"", "\\\"")}\""
|
||||
}
|
||||
yantai {
|
||||
dimension "project"
|
||||
buildConfigField 'String', 'URLs', "\"${readFileToJson("yantai").replace("\"", "\\\"")}\""
|
||||
buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("yantai").replace("\"", "\\\"")}\""
|
||||
}
|
||||
|
||||
dali {
|
||||
dimension "project"
|
||||
buildConfigField 'String', 'URLs', "\"${readFileToJson("dali").replace("\"", "\\\"")}\""
|
||||
buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("dali").replace("\"", "\\\"")}\""
|
||||
}
|
||||
|
||||
// 空业务 主要是给鹰眼使用
|
||||
@@ -283,6 +286,7 @@ android {
|
||||
apply from: "./productFlavors/fPadLenovo.gradle"
|
||||
apply from: "./productFlavors/fOchBus.gradle"
|
||||
apply from: "./productFlavors/fOchShuttle.gradle"
|
||||
apply from: "./productFlavors/fOchShuttleM2.gradle"
|
||||
apply from: "./productFlavors/fOchTaxi.gradle"
|
||||
apply from: "./productFlavors/fOchBusPassenger.gradle"
|
||||
apply from: "./productFlavors/fOchShuttlePassengerM2.gradle"
|
||||
@@ -460,7 +464,7 @@ boolean isReleaseBuild() {
|
||||
Object readFileToJson(env){
|
||||
try {
|
||||
// 加载config.json 文件
|
||||
File file = new File("${rootDir}/app/urlConfig.json")
|
||||
File file = new File("${rootDir}/app/config/urlConfig.json")
|
||||
def jsonSlurper = new JsonSlurper()
|
||||
// 解析json
|
||||
def config = jsonSlurper.parse(file)
|
||||
@@ -510,3 +514,38 @@ def variantName() {
|
||||
|
||||
}
|
||||
|
||||
Object readFileToJsonTemp(env){
|
||||
try {
|
||||
// 加载config.json 文件
|
||||
File file = new File("${rootDir}/app/config/tempConfig.json")
|
||||
def jsonSlurper = new JsonSlurper()
|
||||
// 解析json
|
||||
def config = jsonSlurper.parse(file)
|
||||
def flavorNames = variantVehicleName()
|
||||
def jsonOutput = new JsonOutput()
|
||||
def getKey = flavorNames
|
||||
config.get(env).each {key, value ->
|
||||
// 匹配flavor对应的 json
|
||||
if(flavorNames.toLowerCase().contains(key)){
|
||||
getKey = key
|
||||
return true
|
||||
}
|
||||
}
|
||||
return jsonOutput.toJson(config.get(env).get(getKey))
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
def variantVehicleName() {
|
||||
if(gradle.startParameter.taskNames.size()>0) {
|
||||
for (String taskName : gradle.startParameter.taskNames) {
|
||||
if (taskName.contains("Debug") | taskName.contains("Release")) {
|
||||
return taskName
|
||||
}
|
||||
}
|
||||
}
|
||||
return "buspassenger"
|
||||
}
|
||||
|
||||
|
||||
176
app/config/tempConfig.json
Normal file
176
app/config/tempConfig.json
Normal file
@@ -0,0 +1,176 @@
|
||||
{
|
||||
"mogo": {
|
||||
"shuttlepassenger": {
|
||||
"ads": [
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "1"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "2"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
"title": "3"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "4"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
||||
"type": 0,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"title": "5"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"title": "6"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "7"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "8"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "9"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
"title": "10"
|
||||
}
|
||||
]
|
||||
},
|
||||
"shuttlepassengerm2": {
|
||||
"ads": [
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1678946244305/dalim2.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "",
|
||||
"title": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"dali": {
|
||||
"shuttlepassenger": {
|
||||
"ads": [
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "1"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "2"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
"title": "3"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "4"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
||||
"type": 0,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"title": "5"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"title": "6"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "7"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "8"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "9"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
"title": "10"
|
||||
}
|
||||
]
|
||||
},
|
||||
"shuttlepassengerm2": {
|
||||
"ads": [
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1678946244305/dalim2.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "",
|
||||
"title": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"yantai": {
|
||||
"shuttlepassenger": {
|
||||
"ads": [
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1680774790614/yangmadao_photo.jpg",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1680774847276/yangmadao_video.mp4",
|
||||
"title": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"shuttlepassengerm2": {
|
||||
"ads": [
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1678946244305/dalim2.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "",
|
||||
"title": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,7 @@ project.dependencies {
|
||||
// 多屏幕-taxi司机端
|
||||
//接驳车司乘端
|
||||
fOchShuttleImplementation (project(':OCH:mogo-och-shuttle'))
|
||||
fOchShuttleM2Implementation (project(':OCH:mogo-och-shuttle'))
|
||||
fOchShuttlePassengerImplementation (project(':OCH:mogo-och-shuttle-passenger'))
|
||||
fOchShuttlePassengerM2Implementation (project(':OCH:mogo-och-shuttle-passenger'))
|
||||
|
||||
|
||||
56
app/productFlavors/fOchShuttleM2.gradle
Normal file
56
app/productFlavors/fOchShuttleM2.gradle
Normal file
@@ -0,0 +1,56 @@
|
||||
project.android.productFlavors {
|
||||
// 衡阳-联想Pad-网约车-小巴车
|
||||
fOchShuttleM2 {
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
}
|
||||
}
|
||||
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersionPadLenovo
|
||||
versionCode rootProject.versionCode as int
|
||||
versionName rootProject.versionName
|
||||
// 应用包名
|
||||
applicationId rootProject.ext.android.fLauncherApplicationId
|
||||
dimension "vehicle"
|
||||
// 和 och/mogo-och-bus-passenger 的flavors的shuttle对应
|
||||
matchingFallbacks = ['shuttle']
|
||||
|
||||
// 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
|
||||
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [
|
||||
AMAP_API_VALUE : rootProject.ext.android.fLauncherAmapApiValue,
|
||||
CHANNEL_VALUE : "fOchShuttleM2", ACTIVITY_ROOT: true,
|
||||
SCREEN_ORIENTATION: "landscape"
|
||||
]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
buildConfigField 'int', 'GPS_PROVIDER', "1"
|
||||
|
||||
// 构建的应用身份类型,具体查看 README.md APP_IDENTITY_MODE规则
|
||||
buildConfigField 'String', 'APP_IDENTITY_MODE', "\"Shuttle_Driver_M2\""
|
||||
// 连接的工控机IP地址
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.103\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
|
||||
// 构建的是否要动态更换模型
|
||||
buildConfigField 'boolean', 'IS_CAR_MODEL_CHANGE', 'false'
|
||||
// 是否需要重写状态栏
|
||||
buildConfigField 'boolean', 'IS_REPLACE_STATUSVIEW', 'false'
|
||||
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//Bus不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ project.android.variantFilter { variant ->
|
||||
if (names.contains("shuttle")) {
|
||||
//Gradle会忽略满足上述条件的所有变体
|
||||
if (names.contains("fOchShuttle")) {
|
||||
} else if (names.contains("fOchShuttleM2")) {
|
||||
} else if (names.contains("fOchShuttlePassenger")) {
|
||||
} else if (names.contains("fOchShuttlePassengerM2")) {
|
||||
} else {
|
||||
@@ -83,6 +84,7 @@ project.android.variantFilter { variant ->
|
||||
if (names.contains("shuttle")) {
|
||||
//Gradle会忽略满足上述条件的所有变体
|
||||
if (names.contains("fOchShuttle")) {
|
||||
} else if (names.contains("fOchShuttleM2")) {
|
||||
} else if (names.contains("fOchShuttlePassenger")) {
|
||||
} else if (names.contains("fOchShuttlePassengerM2")) {
|
||||
} else {
|
||||
|
||||
@@ -46,6 +46,8 @@ object ConfigStartUp {
|
||||
FunctionBuildConfig.urlJson = GsonUtils.fromJson(BuildConfig.URLs, UrlConfig::class.java)
|
||||
//不能启动自动驾驶的档位
|
||||
FunctionBuildConfig.unableLaunchAutopilotGear = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR
|
||||
// 临时配置json
|
||||
FunctionBuildConfig.tempConfig = BuildConfig.tempConfig
|
||||
|
||||
// // 这里影响当前Activity的身份信息,多进程先保持与原来一样,主进程为司机端,:passenger 进程为乘客端 TODO 暂时不启用,仅做洱海交付,独立乘客屏+宣传视频
|
||||
// if (ProcessUtils.getCurrentProcessName().contains(":passenger")) {
|
||||
@@ -90,19 +92,18 @@ object ConfigStartUp {
|
||||
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche
|
||||
}else if (AppIdentityModeUtils.isM2(FunctionBuildConfig.appIdentityMode)){
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.m2
|
||||
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
|
||||
} else if (AppIdentityModeUtils.isSweeper(FunctionBuildConfig.appIdentityMode)) {
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.huanwei
|
||||
} else if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)){
|
||||
} else if (AppIdentityModeUtils.isJL(FunctionBuildConfig.appIdentityMode)){
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
|
||||
} else if (AppIdentityModeUtils.isM1(FunctionBuildConfig.appIdentityMode)){
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.m1
|
||||
}else if (AppIdentityModeUtils.isM2(FunctionBuildConfig.appIdentityMode)) {
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.m2
|
||||
}
|
||||
|
||||
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) ||
|
||||
AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)
|
||||
|
||||
@@ -105,6 +105,16 @@ object FunctionBuildConfig {
|
||||
@JvmField
|
||||
var appIdentityMode = "Taxi_Driver_Base"
|
||||
|
||||
/**
|
||||
* 临时配置json
|
||||
* 广告json
|
||||
*
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var tempConfig = ""
|
||||
|
||||
|
||||
/**
|
||||
* 配置连接工控机的IP地址
|
||||
* 小巴车 192.168.8.102
|
||||
|
||||
@@ -25,7 +25,8 @@ public class ScreenHelper {
|
||||
AppIdentityModeUtils.isPassenger((FunctionBuildConfig.appIdentityMode))) {
|
||||
baseWidth = 1920;
|
||||
baseHeight = 1080;
|
||||
} else if (AppIdentityModeUtils.isM2(FunctionBuildConfig.appIdentityMode)) {
|
||||
} else if (AppIdentityModeUtils.isM2(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isPassenger((FunctionBuildConfig.appIdentityMode))) {
|
||||
baseWidth = 1080;
|
||||
baseHeight = 1920;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user