Merge branch 'refs/heads/dev_robotaxi-d_240912_6.7.0' into dev_robotaxi-d_240912_6.7.2_local
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
package com.mogo.och.bus.passenger.bean
|
||||||
|
|
||||||
|
import com.mogo.eagle.core.data.BaseData
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网约车小巴路线接口请求响应结果 返回的是对应司机屏的线路信息
|
||||||
|
*
|
||||||
|
* @author tongchenfei
|
||||||
|
*/
|
||||||
|
data class ResponseSiteIntroduce(val data: MutableList<SiteIntroduceInfo>?) : BaseData(){
|
||||||
|
|
||||||
|
data class SiteIntroduceInfo(val siteId:Long,val introduceList:MutableList<IntroduceInfo>)
|
||||||
|
|
||||||
|
data class IntroduceInfo(val type:Int,val url :String,val seq:Int)
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.mogo.och.bus.passenger.model
|
|||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import com.mogo.commons.env.ProjectUtils
|
||||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||||
import com.mogo.eagle.core.data.map.MogoLocation
|
import com.mogo.eagle.core.data.map.MogoLocation
|
||||||
@@ -14,6 +15,7 @@ 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.mogo.logger.scene.SceneConstant
|
||||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||||
import com.mogo.och.bus.passenger.bean.PM2RoutesResponse
|
import com.mogo.och.bus.passenger.bean.PM2RoutesResponse
|
||||||
|
import com.mogo.och.bus.passenger.bean.ResponseSiteIntroduce
|
||||||
import com.mogo.och.bus.passenger.callback.IAutopilotStatusCallback
|
import com.mogo.och.bus.passenger.callback.IAutopilotStatusCallback
|
||||||
import com.mogo.och.bus.passenger.callback.IBusPassegerDriverStatusCallback
|
import com.mogo.och.bus.passenger.callback.IBusPassegerDriverStatusCallback
|
||||||
import com.mogo.och.bus.passenger.callback.IDrivingInfoCallback
|
import com.mogo.och.bus.passenger.callback.IDrivingInfoCallback
|
||||||
@@ -26,12 +28,14 @@ import com.mogo.och.common.module.biz.login.ILoginCallback
|
|||||||
import com.mogo.och.common.module.biz.login.LoginStatusEnum
|
import com.mogo.och.common.module.biz.login.LoginStatusEnum
|
||||||
import com.mogo.och.common.module.biz.login.LoginStatusManager
|
import com.mogo.och.common.module.biz.login.LoginStatusManager
|
||||||
import com.mogo.och.common.module.biz.login.OpenOrderStatusEnum
|
import com.mogo.och.common.module.biz.login.OpenOrderStatusEnum
|
||||||
|
import com.mogo.och.common.module.biz.media.MediaManager
|
||||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchAutopilotStatusListener
|
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchAutopilotStatusListener
|
||||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatusListenerManager
|
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatusListenerManager
|
||||||
import com.mogo.och.common.module.manager.autopilot.location.OchLocationManager
|
import com.mogo.och.common.module.manager.autopilot.location.OchLocationManager
|
||||||
import com.mogo.och.common.module.manager.distance.IDistanceListener
|
import com.mogo.och.common.module.manager.distance.IDistanceListener
|
||||||
import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager
|
import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager
|
||||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||||
|
import com.mogo.och.common.module.manager.download.DownloadManager
|
||||||
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
||||||
import com.mogo.och.common.module.manager.loop.LoopInfo
|
import com.mogo.och.common.module.manager.loop.LoopInfo
|
||||||
import com.mogo.och.common.module.manager.socket.cloud.AbnormalFactorsLoopManager
|
import com.mogo.och.common.module.manager.socket.cloud.AbnormalFactorsLoopManager
|
||||||
@@ -43,6 +47,7 @@ import com.mogo.och.common.module.manager.socket.lan.bean.TaskDetailsMsg
|
|||||||
import com.mogo.och.common.module.network.OchCommonServiceCallback
|
import com.mogo.och.common.module.network.OchCommonServiceCallback
|
||||||
import com.mogo.och.common.module.utils.OCHThreadPoolManager
|
import com.mogo.och.common.module.utils.OCHThreadPoolManager
|
||||||
import com.mogo.och.common.module.utils.PinYinUtil
|
import com.mogo.och.common.module.utils.PinYinUtil
|
||||||
|
import com.mogo.och.common.module.wigets.media.MediaItem
|
||||||
import com.mogo.och.data.bean.BusRoutesResult
|
import com.mogo.och.data.bean.BusRoutesResult
|
||||||
import com.mogo.och.data.bean.BusStationBean
|
import com.mogo.och.data.bean.BusStationBean
|
||||||
import com.mogo.och.data.bean.BusTransferData
|
import com.mogo.och.data.bean.BusTransferData
|
||||||
@@ -202,6 +207,9 @@ object OrderModel {
|
|||||||
"onReceivedServerSn = $sn"
|
"onReceivedServerSn = $sn"
|
||||||
)
|
)
|
||||||
mDriverStatusCallback?.updateDriverSn(sn)
|
mDriverStatusCallback?.updateDriverSn(sn)
|
||||||
|
sn?.let {
|
||||||
|
querySiteIntroduce()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -213,6 +221,33 @@ object OrderModel {
|
|||||||
LanSocketManager.sendMsgToServer(msg)
|
LanSocketManager.sendMsgToServer(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun querySiteIntroduce(){
|
||||||
|
mContext?.let {
|
||||||
|
if (ProjectUtils.isSaas()) {
|
||||||
|
BusPassengerServiceManager.querySiteIntroduceBySn(it,object : OchCommonServiceCallback<ResponseSiteIntroduce>{
|
||||||
|
override fun onSuccess(response: ResponseSiteIntroduce?) {
|
||||||
|
response?.let {response->
|
||||||
|
downloadSiteIntroduce(response)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFail(code: Int, msg: String?) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun downloadSiteIntroduce(response: ResponseSiteIntroduce) {
|
||||||
|
response.data?.forEach {siteIntroduceInfo ->
|
||||||
|
siteIntroduceInfo.introduceList.forEach {introduceInfo ->
|
||||||
|
DownloadManager.downloadVideoFile(introduceInfo.url,null)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun queryDriverOperationStatus() {
|
private fun queryDriverOperationStatus() {
|
||||||
LoginStatusManager.addListener(TAG,object: ILoginCallback{
|
LoginStatusManager.addListener(TAG,object: ILoginCallback{
|
||||||
@@ -319,6 +354,13 @@ object OrderModel {
|
|||||||
endStation.longitude = endStationInfo.gcjLon
|
endStation.longitude = endStationInfo.gcjLon
|
||||||
endStation.latitude = endStationInfo.gcjLat
|
endStation.latitude = endStationInfo.gcjLat
|
||||||
TrajectoryAndDistanceManager.setStationPoint(startStation, endStation, lineId.toLong())
|
TrajectoryAndDistanceManager.setStationPoint(startStation, endStation, lineId.toLong())
|
||||||
|
val introductionList = mutableListOf<MediaItem>()
|
||||||
|
endStationInfo.videoList.forEach {
|
||||||
|
if(it.type==1) {
|
||||||
|
introductionList.add(MediaItem(MediaItem.PrioritySite, it.url,MediaItem.MEDIA_TYPE_VIDEO,"",""))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MediaManager.postSiteIntroduceInfo(introductionList)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun cleanStation(type: String) {
|
fun cleanStation(type: String) {
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import com.mogo.och.bus.passenger.bean.PM2RoutesResponse
|
|||||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||||
import com.mogo.commons.debug.DebugConfig
|
import com.mogo.commons.debug.DebugConfig
|
||||||
import com.mogo.och.bus.passenger.bean.BusPassengerQueryLineRequest
|
import com.mogo.och.bus.passenger.bean.BusPassengerQueryLineRequest
|
||||||
import com.mogo.och.bus.passenger.bean.BusPassengerOperationStatusResponse
|
|
||||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||||
import com.mogo.commons.storage.SharedPrefsMgr
|
import com.mogo.commons.storage.SharedPrefsMgr
|
||||||
|
import com.mogo.och.bus.passenger.bean.ResponseSiteIntroduce
|
||||||
import com.mogo.och.common.module.biz.lansocket.LoginLanPassengerSocket
|
import com.mogo.och.common.module.biz.lansocket.LoginLanPassengerSocket
|
||||||
import com.mogo.och.common.module.constant.OchCommonConst
|
import com.mogo.och.common.module.constant.OchCommonConst
|
||||||
import com.mogo.och.common.module.network.OchCommonServiceCallback
|
import com.mogo.och.common.module.network.OchCommonServiceCallback
|
||||||
@@ -51,5 +51,21 @@ object BusPassengerServiceManager {
|
|||||||
.subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverSiteByCoordinate",false))
|
.subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverSiteByCoordinate",false))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 查询绑定行驶的小巴车路线
|
||||||
|
* @param context
|
||||||
|
* @param callback
|
||||||
|
*/
|
||||||
|
@JvmStatic
|
||||||
|
fun querySiteIntroduceBySn(
|
||||||
|
context: Context, callback: OchCommonServiceCallback<ResponseSiteIntroduce>?
|
||||||
|
) {
|
||||||
|
mBusPassengerSaasServiceApi.querySiteIntroduceBySn(
|
||||||
|
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||||
|
SharedPrefsMgr.getInstance().token,
|
||||||
|
LoginLanPassengerSocket.driverSn
|
||||||
|
).transformTry()
|
||||||
|
.subscribe(OchCommonSubscribeImpl(context, callback, "querySiteIntroduceBySn"))
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
package com.mogo.och.bus.passenger.network;
|
package com.mogo.och.bus.passenger.network;
|
||||||
|
|
||||||
import com.mogo.och.bus.passenger.bean.BusPassengerOperationStatusResponse;
|
|
||||||
import com.mogo.och.bus.passenger.bean.BusPassengerQueryLineRequest;
|
|
||||||
import com.mogo.och.bus.passenger.bean.PM2RoutesResponse;
|
import com.mogo.och.bus.passenger.bean.PM2RoutesResponse;
|
||||||
|
import com.mogo.och.bus.passenger.bean.ResponseSiteIntroduce;
|
||||||
|
|
||||||
import io.reactivex.Observable;
|
import io.reactivex.Observable;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
@@ -26,4 +25,12 @@ public interface PassengerSAASServiceApi {
|
|||||||
@GET( "/och-bus-cabin/api/business/v1/driver/bus/lineDataWithDriver/query" )
|
@GET( "/och-bus-cabin/api/business/v1/driver/bus/lineDataWithDriver/query" )
|
||||||
Observable<PM2RoutesResponse> queryDriverSiteByCoordinate(@Header("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn);
|
Observable<PM2RoutesResponse> queryDriverSiteByCoordinate(@Header("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询车辆对应站点的所有视频介绍视频
|
||||||
|
* @return 接口返回数据
|
||||||
|
*/
|
||||||
|
@Headers( {"Content-Type:application/json;charset=UTF-8"} )
|
||||||
|
@GET( "/och-bus-cabin/api/business/v1/querySiteIntroduceBySn" )
|
||||||
|
Observable<ResponseSiteIntroduce> querySiteIntroduceBySn(@Header("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import com.mogo.commons.mvp.MvpFragment
|
|||||||
import com.mogo.commons.storage.SharedPrefsMgr
|
import com.mogo.commons.storage.SharedPrefsMgr
|
||||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView
|
import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView
|
||||||
|
import com.mogo.eagle.core.function.hmi.ui.widget.ColdStartView
|
||||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||||
@@ -43,6 +44,7 @@ import kotlinx.android.synthetic.main.biz_login_view.biz_login_svp
|
|||||||
import kotlinx.android.synthetic.main.biz_login_view.bv_switch_business
|
import kotlinx.android.synthetic.main.biz_login_view.bv_switch_business
|
||||||
import kotlinx.android.synthetic.main.biz_login_view.cl_login_info
|
import kotlinx.android.synthetic.main.biz_login_view.cl_login_info
|
||||||
import kotlinx.android.synthetic.main.biz_login_view.eiv_Info
|
import kotlinx.android.synthetic.main.biz_login_view.eiv_Info
|
||||||
|
import kotlinx.android.synthetic.main.biz_login_view.viewColdStart
|
||||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||||
|
|
||||||
|
|
||||||
@@ -106,56 +108,67 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
|||||||
biz_login_svp.setIsTouchWigetFull(false)
|
biz_login_svp.setIsTouchWigetFull(false)
|
||||||
biz_login_svp.enableshowProgressDialog = false
|
biz_login_svp.enableshowProgressDialog = false
|
||||||
biz_login_svp.enableDoubleClick = false
|
biz_login_svp.enableDoubleClick = false
|
||||||
gsyVideoOptionBuilder.setUrl(videoUrl)
|
|
||||||
.setCacheWithPlay(false)
|
|
||||||
.setPlayTag("TaxiPassengerArrivedView")
|
|
||||||
.build(biz_login_svp)
|
|
||||||
|
|
||||||
biz_login_svp.setVideoAllCallBack(object : GSYSampleCallBack() {
|
viewColdStart.setColdStartResultListener(object: ColdStartView.ColdStartResultListener{
|
||||||
override fun onAutoComplete(url: String?, vararg objects: Any?) {
|
override fun coldStartSuccess() {
|
||||||
if (AppIdentityModeUtils.isT1T2(FunctionBuildConfig.appIdentityMode)) {
|
gsyVideoOptionBuilder.setUrl(videoUrl)
|
||||||
biz_login_svp?.setBackgroundResource(R.drawable.biz_login_bg_taxi_end)
|
.setCacheWithPlay(false)
|
||||||
}else{
|
.setPlayTag("TaxiPassengerArrivedView")
|
||||||
biz_login_svp?.setBackgroundResource(R.drawable.biz_login_bg_bus_end)
|
.build(biz_login_svp)
|
||||||
}
|
|
||||||
|
|
||||||
}
|
biz_login_svp.setVideoAllCallBack(object : GSYSampleCallBack() {
|
||||||
})
|
override fun onAutoComplete(url: String?, vararg objects: Any?) {
|
||||||
if (showLoginInfoAnimator1 == null) {
|
if (AppIdentityModeUtils.isT1T2(FunctionBuildConfig.appIdentityMode)) {
|
||||||
showLoginInfoAnimator1 = ObjectAnimator.ofFloat(cl_login_info, "alpha", 0f, 1f)
|
biz_login_svp?.setBackgroundResource(R.drawable.biz_login_bg_taxi_end)
|
||||||
showLoginInfoAnimator1?.interpolator = LinearInterpolator()
|
}else{
|
||||||
}
|
biz_login_svp?.setBackgroundResource(R.drawable.biz_login_bg_bus_end)
|
||||||
if (showLoginInfoAnimator2 == null) {
|
}
|
||||||
val dp2px = AutoSizeUtils.dp2px(AbsMogoApplication.getApp(), -50f)
|
|
||||||
showLoginInfoAnimator2 = ObjectAnimator.ofFloat(cl_login_info, "translationY", 0f, dp2px.toFloat())
|
|
||||||
showLoginInfoAnimator2?.interpolator = DecelerateInterpolator()
|
|
||||||
}
|
|
||||||
UiThreadHandler.postDelayed({
|
|
||||||
cl_login_info?.let {
|
|
||||||
val animatorSet = AnimatorSet()
|
|
||||||
animatorSet.playTogether(showLoginInfoAnimator1, showLoginInfoAnimator2)
|
|
||||||
animatorSet.duration = 500
|
|
||||||
animatorSet.addListener(object :AnimatorListener{
|
|
||||||
override fun onAnimationStart(animation: Animator) {
|
|
||||||
cl_login_info?.visibility = View.VISIBLE
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onAnimationEnd(animation: Animator) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onAnimationCancel(animation: Animator) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onAnimationRepeat(animation: Animator) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
})
|
||||||
animatorSet.start()
|
if (showLoginInfoAnimator1 == null) {
|
||||||
|
showLoginInfoAnimator1 = ObjectAnimator.ofFloat(cl_login_info, "alpha", 0f, 1f)
|
||||||
|
showLoginInfoAnimator1?.interpolator = LinearInterpolator()
|
||||||
|
}
|
||||||
|
if (showLoginInfoAnimator2 == null) {
|
||||||
|
val dp2px = AutoSizeUtils.dp2px(AbsMogoApplication.getApp(), -50f)
|
||||||
|
showLoginInfoAnimator2 = ObjectAnimator.ofFloat(cl_login_info, "translationY", 0f, dp2px.toFloat())
|
||||||
|
showLoginInfoAnimator2?.interpolator = DecelerateInterpolator()
|
||||||
|
}
|
||||||
|
UiThreadHandler.postDelayed({
|
||||||
|
cl_login_info?.let {
|
||||||
|
val animatorSet = AnimatorSet()
|
||||||
|
animatorSet.playTogether(showLoginInfoAnimator1, showLoginInfoAnimator2)
|
||||||
|
animatorSet.duration = 500
|
||||||
|
animatorSet.addListener(object :AnimatorListener{
|
||||||
|
override fun onAnimationStart(animation: Animator) {
|
||||||
|
cl_login_info?.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onAnimationEnd(animation: Animator) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onAnimationCancel(animation: Animator) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onAnimationRepeat(animation: Animator) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
animatorSet.start()
|
||||||
|
}
|
||||||
|
},2_000,UiThreadHandler.MODE.QUEUE)
|
||||||
|
biz_login_svp.startPlayLogic()
|
||||||
}
|
}
|
||||||
},2_000,UiThreadHandler.MODE.QUEUE)
|
|
||||||
|
override fun coldStartFail() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
inputPhoneNormal()
|
inputPhoneNormal()
|
||||||
@@ -304,7 +317,6 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
|||||||
biz_cl_driver_main?.viewTreeObserver?.addOnGlobalLayoutListener(onlayoutListener)
|
biz_cl_driver_main?.viewTreeObserver?.addOnGlobalLayoutListener(onlayoutListener)
|
||||||
super.onResume()
|
super.onResume()
|
||||||
CallerLogger.d(TAG, "onResume")
|
CallerLogger.d(TAG, "onResume")
|
||||||
biz_login_svp.startPlayLogic()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
|
|||||||
@@ -180,4 +180,14 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
<com.mogo.eagle.core.function.hmi.ui.widget.ColdStartView
|
||||||
|
android:id="@+id/viewColdStart"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
/>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -15,8 +15,5 @@
|
|||||||
<string name="network_error_tip">网络异常,请稍后重试</string>
|
<string name="network_error_tip">网络异常,请稍后重试</string>
|
||||||
<string name="request_error_tip">请求出现异常,请稍后重试</string>
|
<string name="request_error_tip">请求出现异常,请稍后重试</string>
|
||||||
|
|
||||||
<string name="qr_cancel">取消</string>
|
|
||||||
<string name="bind_driver_qr_title">扫描二维码完成车辆绑定</string>
|
|
||||||
|
|
||||||
<string name="biz_log_i_see">我知道了</string>
|
<string name="biz_log_i_see">我知道了</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.mogo.och.common.module.biz.media
|
||||||
|
|
||||||
|
import com.mogo.och.common.module.wigets.media.MediaItem
|
||||||
|
|
||||||
|
interface IMediaDispatch {
|
||||||
|
fun diapatchMedia(list :MutableList<MediaItem>)
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.mogo.och.common.module.biz.media
|
||||||
|
|
||||||
|
import com.mogo.och.common.module.utils.CallerBase
|
||||||
|
import com.mogo.och.common.module.wigets.media.MediaItem
|
||||||
|
|
||||||
|
object MediaManager : CallerBase<IMediaDispatch>() {
|
||||||
|
|
||||||
|
fun postSiteIntroduceInfo(list: MutableList<MediaItem>){
|
||||||
|
M_LISTENERS.forEach {
|
||||||
|
val listener = it.value
|
||||||
|
listener.diapatchMedia(list)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -143,6 +143,16 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
|
|||||||
TrajectoryManager.removeDownLoadSuccessLine(lineId)
|
TrajectoryManager.removeDownLoadSuccessLine(lineId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
when (guardianInfo?.code) {
|
||||||
|
MogoReport.Code.Error.EMAP.TRA_LOAD_FAILED -> {
|
||||||
|
OchChainLogManager.writeChainLog("轨迹监控","onAutopilotGuardian() 加载轨迹文件失败", true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY)
|
||||||
|
}
|
||||||
|
MogoReport.Code.Error.EMAP.TRA_NOT_EXIST -> {
|
||||||
|
OchChainLogManager.writeChainLog("轨迹监控","onAutopilotGuardian() 无法找到轨迹文件", true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY)
|
||||||
|
}
|
||||||
|
else -> {}
|
||||||
|
}
|
||||||
M_LISTENERS.forEach {
|
M_LISTENERS.forEach {
|
||||||
val listener = it.value
|
val listener = it.value
|
||||||
listener.onAutopilotGuardian(guardianInfo)
|
listener.onAutopilotGuardian(guardianInfo)
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
|||||||
import com.mogo.eagle.core.utilcode.util.DateTimeUtils
|
import com.mogo.eagle.core.utilcode.util.DateTimeUtils
|
||||||
import com.mogo.och.common.module.manager.autopilot.OCHAdasAbilityManager
|
import com.mogo.och.common.module.manager.autopilot.OCHAdasAbilityManager
|
||||||
import com.mogo.och.common.module.manager.autopilot.autopilot.bean.SessionWithTime
|
import com.mogo.och.common.module.manager.autopilot.autopilot.bean.SessionWithTime
|
||||||
|
import com.mogo.och.common.module.manager.autopilot.line.LineManager
|
||||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||||
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
||||||
import com.mogo.och.common.module.utils.RxUtils
|
import com.mogo.och.common.module.utils.RxUtils
|
||||||
@@ -209,6 +210,7 @@ object OchAutopilotAnalytics {
|
|||||||
RxUtils.disposeSubscribe(timeOutDisposable)
|
RxUtils.disposeSubscribe(timeOutDisposable)
|
||||||
timeOutDisposable = RxUtils.createSubscribe(LOOP_PERIOD_15S) {
|
timeOutDisposable = RxUtils.createSubscribe(LOOP_PERIOD_15S) {
|
||||||
triggerStartAutopilotFailureEvent("", "15s后app等待超时", System.currentTimeMillis())
|
triggerStartAutopilotFailureEvent("", "15s后app等待超时", System.currentTimeMillis())
|
||||||
|
LineManager.invokeStartAutopilotTimeOut()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,11 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters.AutoPilotLi
|
|||||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters.AutoPilotLonLat
|
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters.AutoPilotLonLat
|
||||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||||
import com.mogo.eagle.core.data.map.MogoLocation
|
import com.mogo.eagle.core.data.map.MogoLocation
|
||||||
|
import com.mogo.eagle.core.data.och.OchInfo
|
||||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||||
|
import com.mogo.eagle.core.function.call.datacenter.CallerDataCenterBizListener
|
||||||
import com.mogo.eagle.core.function.call.map.CallerMapGlobalTrajectoryDrawManager
|
import com.mogo.eagle.core.function.call.map.CallerMapGlobalTrajectoryDrawManager
|
||||||
import com.mogo.eagle.core.function.call.och.CallerEagleBaseFunctionCall4OchManager
|
import com.mogo.eagle.core.function.call.och.CallerEagleBaseFunctionCall4OchManager
|
||||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||||
@@ -77,6 +79,10 @@ object LineManager : CallerBase<ILineCallback>() {
|
|||||||
private var autopilotId: String by Delegates.observable("") { _, oldValue, newValue ->
|
private var autopilotId: String by Delegates.observable("") { _, oldValue, newValue ->
|
||||||
if (oldValue != newValue) {
|
if (oldValue != newValue) {
|
||||||
CallerEagleBaseFunctionCall4OchManager.setOchAutopilotOrderId(newValue)
|
CallerEagleBaseFunctionCall4OchManager.setOchAutopilotOrderId(newValue)
|
||||||
|
getStations { start, end ->
|
||||||
|
CallerDataCenterBizListener.invokeOchInfo(OchInfo(0, mutableListOf(start.toMogoLocation(),end.toMogoLocation())))
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,172 @@
|
|||||||
|
package com.mogo.och.common.module.manager.download
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.content.Context
|
||||||
|
import android.os.Environment
|
||||||
|
import android.text.TextUtils
|
||||||
|
import android.util.Log
|
||||||
|
import com.mogo.commons.AbsMogoApplication
|
||||||
|
import com.mogo.eagle.core.utilcode.download.DownloadUtils
|
||||||
|
import com.mogo.eagle.core.utilcode.download.callback.IDownloadListener
|
||||||
|
import com.mogo.eagle.core.utilcode.util.EncryptUtils
|
||||||
|
import com.mogo.eagle.core.utilcode.util.RegexUtils
|
||||||
|
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||||
|
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
||||||
|
import com.mogo.och.common.module.manager.loop.LoopInfo
|
||||||
|
import com.mogo.och.common.module.utils.FileUtils
|
||||||
|
import io.reactivex.schedulers.Schedulers
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
|
@SuppressLint("StaticFieldLeak")
|
||||||
|
object DownloadManager {
|
||||||
|
|
||||||
|
private const val TAG = "DownloadManager"
|
||||||
|
|
||||||
|
private val waitDownLoadList = mutableListOf<OchDownLoad>()
|
||||||
|
|
||||||
|
private val context: Context?=AbsMogoApplication.getApp()
|
||||||
|
|
||||||
|
init {
|
||||||
|
BizLoopManager.setLoopFunction(TAG, LoopInfo(5*60, ::go2Download, scheduler = Schedulers.io()))
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取本地缓存文件的文件全路径
|
||||||
|
*/
|
||||||
|
private fun getFileCacheDir(): String {
|
||||||
|
// 有些手机需要通过自定义目录
|
||||||
|
val relativePath = "mogo" + File.separator + "media" + File.separator
|
||||||
|
val cacheDir = File(Environment.getExternalStorageDirectory(), relativePath)
|
||||||
|
if (com.mogo.eagle.core.utilcode.util.FileUtils.createOrExistsDir(cacheDir)) {
|
||||||
|
return cacheDir.absolutePath
|
||||||
|
}
|
||||||
|
|
||||||
|
return FileUtils.getCacheDirectory(context, "") + relativePath
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本地是否已经存在下载完成的文件
|
||||||
|
*/
|
||||||
|
private fun isLocalCacheFileExists(mediaUrl: String): Boolean {
|
||||||
|
val localVideoCacheFilePath =
|
||||||
|
getCacheFileFullPathByUrl(mediaUrl)
|
||||||
|
Log.e(TAG, "文件是否存在,mediaUrl=$mediaUrl------本地文件:${localVideoCacheFilePath}")
|
||||||
|
return com.mogo.eagle.core.utilcode.util.FileUtils.isFileExists(localVideoCacheFilePath)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取文件缓存的缓存path, 文件名以base64编码避免 中文命名,重复文件名的影响
|
||||||
|
*/
|
||||||
|
private fun getCacheFileFullPathByUrl(mediaUrl: String): String {
|
||||||
|
return getFileCacheDir() +File.separator +getCacheFileName(mediaUrl)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本地缓存文件的文件名,md5编码避免文件名重复或者特殊字符编码问题
|
||||||
|
*/
|
||||||
|
private fun getCacheFileName(mediaUrl: String): String {
|
||||||
|
val fileSuffix = FileUtils.getExtension(mediaUrl)
|
||||||
|
if (TextUtils.isEmpty(fileSuffix)) {
|
||||||
|
Log.e(TAG, "getCacheFileName 根据url获取文件后缀不合法,mediaUrl=$mediaUrl")
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return EncryptUtils.encryptMD5ToString(mediaUrl) + FileUtils.EXTENSION_SEPARATOR + fileSuffix
|
||||||
|
}
|
||||||
|
|
||||||
|
fun clearLocalFile(localVideoPath:String) {
|
||||||
|
if (com.mogo.eagle.core.utilcode.util.FileUtils.isFileExists(localVideoPath)) {
|
||||||
|
com.mogo.eagle.core.utilcode.util.FileUtils.delete(localVideoPath)
|
||||||
|
}
|
||||||
|
OchChainLogManager.writechainLogDownload("删除本地文件","localVideoPath:${localVideoPath}")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun downloadVideoFile(mediaUrl: String, listener: IDownloadListener?) {
|
||||||
|
if (!RegexUtils.isURL(mediaUrl)) {
|
||||||
|
OchChainLogManager.writechainLogDownload("准备下载","url 错误 ${mediaUrl}")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
val downloadUrl = mediaUrl
|
||||||
|
val downloadDir = getFileCacheDir()
|
||||||
|
val downloadFileName = getCacheFileName(mediaUrl)+"_temp"
|
||||||
|
|
||||||
|
waitDownLoadList.add(OchDownLoad(downloadUrl,downloadDir,downloadFileName,listener))
|
||||||
|
|
||||||
|
if(waitDownLoadList.size==1){
|
||||||
|
go2Download()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun go2Download(){
|
||||||
|
if(waitDownLoadList.isEmpty()){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
val first = waitDownLoadList.first()
|
||||||
|
// 临时文件存在 需要删除重新下载
|
||||||
|
if (com.mogo.eagle.core.utilcode.util.FileUtils.isFileExists(first.downloadDir+File.separator+first.downloadFileName)) {
|
||||||
|
OchChainLogManager.writechainLogDownload("删除临时文件","文件名称:${first.downloadDir+File.separator+first.downloadFileName}")
|
||||||
|
clearLocalFile(first.downloadDir+File.separator+first.downloadFileName)
|
||||||
|
}
|
||||||
|
// 改名后文件存在 不需要下载
|
||||||
|
if(isLocalCacheFileExists(first.downloadUrl)){
|
||||||
|
if(waitDownLoadList.size>0) {
|
||||||
|
waitDownLoadList.removeFirst()
|
||||||
|
}
|
||||||
|
OchChainLogManager.writechainLogDownload("取消下载文件已存在","信息:${first}")
|
||||||
|
go2Download()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
OchChainLogManager.writechainLogDownload("准备下载","信息:${first}")
|
||||||
|
DownloadUtils.downLoad(
|
||||||
|
context,
|
||||||
|
first.downloadUrl,
|
||||||
|
first.downloadDir,
|
||||||
|
first.downloadFileName,
|
||||||
|
object :IDownloadListener{
|
||||||
|
override fun onStart(url: String) {
|
||||||
|
OchChainLogManager.writechainLogDownload("开始下载","url:${url}")
|
||||||
|
first.listener?.onStart(url)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onProgress(url: String, downloaded: Long, total: Long) {
|
||||||
|
first.listener?.onProgress(url,downloaded,total)
|
||||||
|
OchChainLogManager.writechainLogDownload("下载中","url:${url}_downloaded${downloaded}_total:${total}",upload = false)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFinished(url: String, path: String) {
|
||||||
|
OchChainLogManager.writechainLogDownload("下载成功","url:${url}---path:${path}")
|
||||||
|
if(waitDownLoadList.size>0) {
|
||||||
|
waitDownLoadList.removeFirst()
|
||||||
|
}
|
||||||
|
if(path.endsWith("_temp")){
|
||||||
|
val tempFile = File(path)
|
||||||
|
val newName = tempFile.name.replace("_temp","")
|
||||||
|
com.mogo.eagle.core.utilcode.util.FileUtils.rename(tempFile,newName)
|
||||||
|
first.listener?.onFinished(url,path.replace("_temp",""))
|
||||||
|
}
|
||||||
|
go2Download()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onError(url: String, error: String?) {
|
||||||
|
first.listener?.onError(url,error)
|
||||||
|
OchChainLogManager.writechainLogDownload("下载错误","url:${url}---error:${error}")
|
||||||
|
clearLocalFile(first.downloadDir+File.separator+first.downloadFileName)
|
||||||
|
if(first.downLoadCount>=5){
|
||||||
|
OchChainLogManager.writechainLogDownload("下载错误5次可终点关注","url:${url}---error:${error}")
|
||||||
|
if(waitDownLoadList.size>0) {
|
||||||
|
waitDownLoadList.removeFirst()
|
||||||
|
}
|
||||||
|
go2Download()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
first.downLoadCount++
|
||||||
|
go2Download()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package com.mogo.och.common.module.manager.download
|
||||||
|
|
||||||
|
import com.mogo.eagle.core.utilcode.download.callback.IDownloadListener
|
||||||
|
import java.util.UUID
|
||||||
|
|
||||||
|
data class OchDownLoad(val downloadUrl:String, val downloadDir:String, val downloadFileName:String, val listener: IDownloadListener?, var downLoadCount:Int = 0)
|
||||||
@@ -33,10 +33,16 @@ object OchChainLogManager {
|
|||||||
|
|
||||||
// 网络接口
|
// 网络接口
|
||||||
const val EVENT_KEY_INFO_Net = "event_key_och_net"
|
const val EVENT_KEY_INFO_Net = "event_key_och_net"
|
||||||
|
|
||||||
|
// 下载日志
|
||||||
|
const val EVENT_KEY_INFO_Download = "event_key_och_download"
|
||||||
|
|
||||||
// 初始化信息
|
// 初始化信息
|
||||||
const val EVENT_KEY_INFO_INIT = "event_key_och_init"
|
const val EVENT_KEY_INFO_INIT = "event_key_och_init"
|
||||||
|
|
||||||
// 局域网内socket 通讯
|
// 局域网内socket 通讯
|
||||||
const val EVENT_KEY_INFO_SOCKET = "analytics_event_och_track_screen_msg"
|
const val EVENT_KEY_INFO_SOCKET = "analytics_event_och_track_screen_msg"
|
||||||
|
|
||||||
// 局域网内socket 连接状态流转
|
// 局域网内socket 连接状态流转
|
||||||
const val EVENT_KEY_INFO_SOCKET_CONNECT = "analytics_event_och_track_screen_connect"
|
const val EVENT_KEY_INFO_SOCKET_CONNECT = "analytics_event_och_track_screen_connect"
|
||||||
|
|
||||||
@@ -51,19 +57,23 @@ object OchChainLogManager {
|
|||||||
const val EVENT_KEY_INFO_DB = "analytics_event_och_db"
|
const val EVENT_KEY_INFO_DB = "analytics_event_och_db"
|
||||||
|
|
||||||
|
|
||||||
fun writeChainLogDb( title: String, info: String) {
|
fun writeChainLogDb(title: String, info: String) {
|
||||||
writeChainLog(title, info, true, EVENT_KEY_INFO_DB)
|
writeChainLog(title, info, true, EVENT_KEY_INFO_DB)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun writeChainLogNet(mustUpdate: Boolean, title: String, info: String) {
|
fun writeChainLogNet(mustUpdate: Boolean, title: String, info: String) {
|
||||||
if(mustUpdate){
|
if (mustUpdate) {
|
||||||
writeChainLog(title, info, true, EVENT_KEY_INFO_Net)
|
writeChainLog(title, info, true, EVENT_KEY_INFO_Net)
|
||||||
}else {
|
} else {
|
||||||
writeChainLog(title, info, DebugConfig.isDebug(), EVENT_KEY_INFO_Net)
|
writeChainLog(title, info, DebugConfig.isDebug(), EVENT_KEY_INFO_Net)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun writechainLogDownload(title: String, info: String,upload: Boolean=true) {
|
||||||
|
writeChainLog(title, info, upload, EVENT_KEY_INFO_Download)
|
||||||
|
}
|
||||||
|
|
||||||
fun writeChainLogScanner(title: String, changeInfo: String) {
|
fun writeChainLogScanner(title: String, changeInfo: String) {
|
||||||
writeChainLog(title, changeInfo, true, EVENT_KEY_INFO_SCANNER)
|
writeChainLog(title, changeInfo, true, EVENT_KEY_INFO_SCANNER)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package com.mogo.och.common.module.wigets
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.graphics.Bitmap
|
||||||
|
import androidx.appcompat.widget.AppCompatImageView
|
||||||
|
import androidx.appcompat.widget.AppCompatTextView
|
||||||
|
import androidx.lifecycle.LifecycleObserver
|
||||||
|
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||||
|
import com.mogo.och.common.module.R
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 带有title, tip,confirm,cancel的dialog
|
||||||
|
*/
|
||||||
|
class BindQRCodeDialogNew: BaseFloatDialog, LifecycleObserver {
|
||||||
|
|
||||||
|
private var qrBm : AppCompatImageView? = null
|
||||||
|
private var qrCancel: AppCompatTextView? = null
|
||||||
|
private var qrTitle: AppCompatTextView? = null
|
||||||
|
|
||||||
|
private var clickListener: ClickListener? = null
|
||||||
|
|
||||||
|
constructor(builder: Builder,context: Context) : super(context) {
|
||||||
|
qrTitle?.text = builder.titleStr
|
||||||
|
qrCancel?.text = builder.cancelStr
|
||||||
|
qrBm?.setImageBitmap(builder.qrBm)
|
||||||
|
}
|
||||||
|
|
||||||
|
init{
|
||||||
|
setContentView(R.layout.bind_driver_qr_view)
|
||||||
|
|
||||||
|
setCanceledOnTouchOutside(true)
|
||||||
|
|
||||||
|
qrTitle = findViewById(R.id.qr_title)
|
||||||
|
qrBm = findViewById(R.id.qr_bm)
|
||||||
|
qrCancel = findViewById(R.id.bind_qr_cancel)
|
||||||
|
|
||||||
|
qrCancel?.setOnClickListener {
|
||||||
|
clickListener?.cancel()
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setClickListener(clickListener: ClickListener) {
|
||||||
|
this.clickListener = clickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ClickListener{
|
||||||
|
fun cancel()
|
||||||
|
}
|
||||||
|
|
||||||
|
class Builder{
|
||||||
|
var titleStr:String = ""
|
||||||
|
var cancelStr:String = ""
|
||||||
|
var qrBm: Bitmap? = null
|
||||||
|
|
||||||
|
fun title(title: String) : Builder{
|
||||||
|
this.titleStr = title
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
fun cancelStr(cancel: String) : Builder{
|
||||||
|
this.cancelStr = cancel
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
fun qrBm(bm: Bitmap) : Builder{
|
||||||
|
this.qrBm = bm
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
fun build(context: Context): BindQRCodeDialogNew? {
|
||||||
|
return BindQRCodeDialogNew(this,context)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,17 +1,21 @@
|
|||||||
package com.mogo.och.common.module.wigets
|
package com.mogo.och.common.module.wigets.dialog
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.graphics.Color
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.animation.Animation
|
import android.view.animation.Animation
|
||||||
import android.view.animation.AnimationUtils
|
import android.view.animation.AnimationUtils
|
||||||
import android.view.animation.LinearInterpolator
|
import android.view.animation.LinearInterpolator
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
|
import androidx.annotation.ColorRes
|
||||||
import androidx.appcompat.widget.AppCompatImageView
|
import androidx.appcompat.widget.AppCompatImageView
|
||||||
import androidx.appcompat.widget.AppCompatTextView
|
import androidx.appcompat.widget.AppCompatTextView
|
||||||
import androidx.lifecycle.LifecycleObserver
|
import androidx.lifecycle.LifecycleObserver
|
||||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||||
|
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||||
import com.mogo.och.common.module.R
|
import com.mogo.och.common.module.R
|
||||||
|
import com.mogo.och.common.module.utils.ResourcesUtils
|
||||||
import io.reactivex.Observable
|
import io.reactivex.Observable
|
||||||
import io.reactivex.disposables.Disposable
|
import io.reactivex.disposables.Disposable
|
||||||
import io.reactivex.schedulers.Schedulers
|
import io.reactivex.schedulers.Schedulers
|
||||||
@@ -28,6 +32,7 @@ class CommonDialogStatus: BaseFloatDialog, LifecycleObserver {
|
|||||||
private var commonTips : TextView? = null
|
private var commonTips : TextView? = null
|
||||||
private var countDownTxt: AppCompatTextView? = null
|
private var countDownTxt: AppCompatTextView? = null
|
||||||
private var commonStatus:AppCompatImageView?=null
|
private var commonStatus:AppCompatImageView?=null
|
||||||
|
private var commonClose:AppCompatImageView?=null
|
||||||
|
|
||||||
private var clickListener: ClickListener? = null
|
private var clickListener: ClickListener? = null
|
||||||
|
|
||||||
@@ -35,9 +40,14 @@ class CommonDialogStatus: BaseFloatDialog, LifecycleObserver {
|
|||||||
|
|
||||||
private var mCountdownValue: Int = 0
|
private var mCountdownValue: Int = 0
|
||||||
|
|
||||||
private var status:Status = Status.ask
|
private var showCloseView:Boolean = false
|
||||||
|
|
||||||
constructor(builder: Builder,context: Context) : super(context) {
|
@ColorRes
|
||||||
|
private var cancelTextColor:Int = R.color.white
|
||||||
|
|
||||||
|
private var status: Status = Status.ask
|
||||||
|
|
||||||
|
constructor(builder: Builder, context: Context) : super(context) {
|
||||||
commonTitle?.text = builder.titleStr
|
commonTitle?.text = builder.titleStr
|
||||||
commonTips?.text = builder.tipsStr
|
commonTips?.text = builder.tipsStr
|
||||||
commonCancel?.text = builder.cancelStr
|
commonCancel?.text = builder.cancelStr
|
||||||
@@ -45,6 +55,12 @@ class CommonDialogStatus: BaseFloatDialog, LifecycleObserver {
|
|||||||
countDownTxt?.text = builder.countDownValue.toString()
|
countDownTxt?.text = builder.countDownValue.toString()
|
||||||
mCountdownValue = builder.countDownValue
|
mCountdownValue = builder.countDownValue
|
||||||
status = builder.statusEnum
|
status = builder.statusEnum
|
||||||
|
showCloseView = builder.showClose
|
||||||
|
cancelTextColor = builder.cancelTextColor
|
||||||
|
this.clickListener = builder.clickListener
|
||||||
|
|
||||||
|
commonCancel?.setTextColor(ResourcesUtils.getColors(cancelTextColor))
|
||||||
|
|
||||||
when (status) {
|
when (status) {
|
||||||
Status.ask -> {
|
Status.ask -> {
|
||||||
commonStatus?.setImageResource(R.drawable.common_dialog_icon_ask)
|
commonStatus?.setImageResource(R.drawable.common_dialog_icon_ask)
|
||||||
@@ -52,6 +68,9 @@ class CommonDialogStatus: BaseFloatDialog, LifecycleObserver {
|
|||||||
Status.loading -> {
|
Status.loading -> {
|
||||||
commonStatus?.setImageResource(R.drawable.common_dialog_status_loading)
|
commonStatus?.setImageResource(R.drawable.common_dialog_status_loading)
|
||||||
}
|
}
|
||||||
|
Status.success -> {
|
||||||
|
commonStatus?.setImageResource(R.drawable.common_feedback_success)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCountdownValue > 0){
|
if (mCountdownValue > 0){
|
||||||
@@ -59,6 +78,9 @@ class CommonDialogStatus: BaseFloatDialog, LifecycleObserver {
|
|||||||
}else{
|
}else{
|
||||||
countDownTxt?.visibility = View.GONE
|
countDownTxt?.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
if(showCloseView){
|
||||||
|
commonClose?.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
init{
|
init{
|
||||||
@@ -72,6 +94,7 @@ class CommonDialogStatus: BaseFloatDialog, LifecycleObserver {
|
|||||||
commonTips = findViewById(R.id.common_dialog_content_new)
|
commonTips = findViewById(R.id.common_dialog_content_new)
|
||||||
countDownTxt = findViewById(R.id.common_count_down_new)
|
countDownTxt = findViewById(R.id.common_count_down_new)
|
||||||
commonStatus = findViewById(R.id.common_dialog_status)
|
commonStatus = findViewById(R.id.common_dialog_status)
|
||||||
|
commonClose = findViewById(R.id.common_dialog_close)
|
||||||
|
|
||||||
commonConfirm?.setOnClickListener{
|
commonConfirm?.setOnClickListener{
|
||||||
clickListener?.confirm()
|
clickListener?.confirm()
|
||||||
@@ -81,6 +104,10 @@ class CommonDialogStatus: BaseFloatDialog, LifecycleObserver {
|
|||||||
clickListener?.cancel()
|
clickListener?.cancel()
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
|
commonClose?.onClick {
|
||||||
|
clickListener?.dismiss()
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setClickListener(clickListener: ClickListener) {
|
fun setClickListener(clickListener: ClickListener) {
|
||||||
@@ -88,8 +115,9 @@ class CommonDialogStatus: BaseFloatDialog, LifecycleObserver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface ClickListener{
|
interface ClickListener{
|
||||||
fun confirm()
|
fun confirm(){}
|
||||||
fun cancel()
|
fun cancel(){}
|
||||||
|
fun dismiss(){}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onAttachedToWindow() {
|
override fun onAttachedToWindow() {
|
||||||
@@ -151,35 +179,53 @@ class CommonDialogStatus: BaseFloatDialog, LifecycleObserver {
|
|||||||
var confirmStr:String = ""
|
var confirmStr:String = ""
|
||||||
var cancelStr:String = ""
|
var cancelStr:String = ""
|
||||||
var countDownValue: Int = 0
|
var countDownValue: Int = 0
|
||||||
|
var showClose:Boolean =false
|
||||||
|
var cancelTextColor:Int = Color.WHITE
|
||||||
|
var clickListener:ClickListener?=null
|
||||||
|
|
||||||
fun title(title: String) : Builder{
|
fun title(title: String) : Builder {
|
||||||
this.titleStr = title
|
this.titleStr = title
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
fun tips(tips: String) : Builder{
|
fun tips(tips: String) : Builder {
|
||||||
this.tipsStr = tips
|
this.tipsStr = tips
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
fun confirmStr(commit: String) : Builder{
|
fun confirmStr(commit: String) : Builder {
|
||||||
this.confirmStr = commit
|
this.confirmStr = commit
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun showClose(show:Boolean):Builder{
|
||||||
|
this.showClose = show
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
fun cancelTextColor(@ColorRes color: Int): Builder {
|
||||||
|
this.cancelTextColor = color
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 不传倒计时没有, >0 有倒计时
|
* 不传倒计时没有, >0 有倒计时
|
||||||
*/
|
*/
|
||||||
fun countdownValue(value: Int): Builder{
|
fun countdownValue(value: Int): Builder {
|
||||||
this.countDownValue = value
|
this.countDownValue = value
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
fun cancelStr(cancel: String) : Builder{
|
fun cancelStr(cancel: String) : Builder {
|
||||||
this.cancelStr = cancel
|
this.cancelStr = cancel
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun clickListener(clickListener: ClickListener): Builder {
|
||||||
|
this.clickListener = clickListener
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
fun build(context: Context): CommonDialogStatus {
|
fun build(context: Context): CommonDialogStatus {
|
||||||
return CommonDialogStatus(this,context)
|
return CommonDialogStatus(this,context)
|
||||||
}
|
}
|
||||||
@@ -191,7 +237,7 @@ class CommonDialogStatus: BaseFloatDialog, LifecycleObserver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum class Status{
|
enum class Status{
|
||||||
ask,loading
|
ask,loading,success
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
package com.mogo.och.common.module.wigets.dialog
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.View
|
||||||
|
import androidx.appcompat.widget.AppCompatImageView
|
||||||
|
import androidx.appcompat.widget.AppCompatTextView
|
||||||
|
import androidx.lifecycle.LifecycleObserver
|
||||||
|
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||||
|
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||||
|
import com.mogo.och.common.module.R
|
||||||
|
import com.mogo.och.common.module.utils.RxUtils
|
||||||
|
|
||||||
|
/**
|
||||||
|
* loading
|
||||||
|
*/
|
||||||
|
class CommonFeedbackDialog : BaseFloatDialog, LifecycleObserver {
|
||||||
|
|
||||||
|
private var status: Status = Status.success
|
||||||
|
|
||||||
|
private val ivFeedbackStatus:AppCompatImageView by lazy { findViewById(R.id.iv_feedback_status) }
|
||||||
|
private val tvFeedbackStatusDescribe:AppCompatTextView by lazy { findViewById(R.id.tv_feedback_status_describe) }
|
||||||
|
|
||||||
|
private var listener:Listener?=null
|
||||||
|
|
||||||
|
private var mRunnable:Runnable= Runnable {
|
||||||
|
ToastUtils.showLong("超时未响应,请求失败")
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(builder: Builder, context: Context) : super(context) {
|
||||||
|
tvFeedbackStatusDescribe.text = builder.titleStr
|
||||||
|
status = builder.statusEnum
|
||||||
|
listener = builder.listener
|
||||||
|
when (status) {
|
||||||
|
Status.success -> {
|
||||||
|
ivFeedbackStatus.setImageResource(R.drawable.common_feedback_success)
|
||||||
|
}
|
||||||
|
Status.fail -> {
|
||||||
|
ivFeedbackStatus.setImageResource(R.drawable.common_feedback_fail)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RxUtils.createSubscribe(1_000) {
|
||||||
|
hide()
|
||||||
|
this.listener?.cancel()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
init {
|
||||||
|
setContentView(R.layout.common_feedback_dialog)
|
||||||
|
setCanceledOnTouchOutside(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class Builder{
|
||||||
|
var statusEnum: Status = Status.success
|
||||||
|
var titleStr:String = ""
|
||||||
|
var listener:Listener?=null
|
||||||
|
|
||||||
|
fun title(title: String) : Builder{
|
||||||
|
this.titleStr = title
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
fun listener(listener: Listener) : Builder{
|
||||||
|
this.listener = listener
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
fun build(context: Context): CommonFeedbackDialog {
|
||||||
|
return CommonFeedbackDialog(this,context)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun status(ask: Status): Builder {
|
||||||
|
this.statusEnum = ask
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Status{
|
||||||
|
success,fail,loading
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Listener{
|
||||||
|
fun cancel()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,14 +3,24 @@ package com.mogo.och.common.module.wigets.media
|
|||||||
data class MediaDataList(val medias: MutableList<MediaItem>)
|
data class MediaDataList(val medias: MutableList<MediaItem>)
|
||||||
|
|
||||||
data class MediaItem(
|
data class MediaItem(
|
||||||
|
var priority:Int,
|
||||||
var fileUrl: String,
|
var fileUrl: String,
|
||||||
var fileType: Int,
|
var fileType: Int,
|
||||||
var coverImageUrl: String,
|
var coverImageUrl: String,
|
||||||
var title: String
|
var title: String,
|
||||||
|
val isTemp:Boolean = false
|
||||||
) {
|
) {
|
||||||
companion object {
|
companion object {
|
||||||
const val MEDIA_TYPE_IMAGE = 1
|
const val MEDIA_TYPE_IMAGE = 1
|
||||||
const val MEDIA_TYPE_VIDEO = 2
|
const val MEDIA_TYPE_VIDEO = 2
|
||||||
|
|
||||||
|
const val PriorityConfi = 2
|
||||||
|
const val PriorityAd = 1
|
||||||
|
const val PrioritySite = 0
|
||||||
|
|
||||||
|
// 站点优先级 0
|
||||||
|
// 广告优先级 1
|
||||||
|
// 本地配置是 2
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isImageType(): Boolean {
|
fun isImageType(): Boolean {
|
||||||
@@ -20,4 +30,6 @@ data class MediaItem(
|
|||||||
fun isVideoType(): Boolean {
|
fun isVideoType(): Boolean {
|
||||||
return this.fileType == MEDIA_TYPE_VIDEO
|
return this.fileType == MEDIA_TYPE_VIDEO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import android.text.TextUtils
|
|||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
import com.mogo.commons.AbsMogoApplication
|
import com.mogo.commons.AbsMogoApplication
|
||||||
import com.mogo.commons.debug.DebugConfig
|
import com.mogo.commons.debug.DebugConfig
|
||||||
|
import com.mogo.commons.env.ProjectUtils
|
||||||
import com.mogo.eagle.core.data.BaseData
|
import com.mogo.eagle.core.data.BaseData
|
||||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||||
@@ -73,9 +74,8 @@ object MediaDataSourceManager {
|
|||||||
if (!mMediaDataSourceListenerMap.containsKey(tag)) {
|
if (!mMediaDataSourceListenerMap.containsKey(tag)) {
|
||||||
mMediaDataSourceListenerMap[tag] = dataSourceListener
|
mMediaDataSourceListenerMap[tag] = dataSourceListener
|
||||||
}
|
}
|
||||||
val isSassProject = isSassProject()
|
MediaPlayLogger.printInfoLog("init, 初始化环境 isSassProject=${ProjectUtils.isSaas()}")
|
||||||
MediaPlayLogger.printInfoLog("init, 初始化环境 isSassProject=$isSassProject")
|
if (ProjectUtils.isSaas()) {
|
||||||
if (isSassProject) {
|
|
||||||
mNetworkService = MoGoRetrofitFactory.getInstance(OchCommonConst.getEagleMisUrl()).create(IMediaNetworkApi::class.java)
|
mNetworkService = MoGoRetrofitFactory.getInstance(OchCommonConst.getEagleMisUrl()).create(IMediaNetworkApi::class.java)
|
||||||
MediaPlayLogger.printInfoLog("init, 开始检查后台配置数据")
|
MediaPlayLogger.printInfoLog("init, 开始检查后台配置数据")
|
||||||
startGetMediaDataSourceLoop()
|
startGetMediaDataSourceLoop()
|
||||||
@@ -265,6 +265,7 @@ data class MediaDataResp(val data: List<MediaData>) : BaseData() {
|
|||||||
val rotationItemList = mutableListOf<MediaItem>()
|
val rotationItemList = mutableListOf<MediaItem>()
|
||||||
mediaDataList?.forEach {
|
mediaDataList?.forEach {
|
||||||
val rotationItem = MediaItem(
|
val rotationItem = MediaItem(
|
||||||
|
priority = MediaItem.PriorityAd,
|
||||||
fileUrl = if (TextUtils.isEmpty(it.file_path)) "" else "${it.file_path}",
|
fileUrl = if (TextUtils.isEmpty(it.file_path)) "" else "${it.file_path}",
|
||||||
fileType = if (it.file_type == 1) MEDIA_TYPE_VIDEO else MEDIA_TYPE_IMAGE,
|
fileType = if (it.file_type == 1) MEDIA_TYPE_VIDEO else MEDIA_TYPE_IMAGE,
|
||||||
coverImageUrl = if (TextUtils.isEmpty(it.cover_path)) "" else "${it.cover_path}",
|
coverImageUrl = if (TextUtils.isEmpty(it.cover_path)) "" else "${it.cover_path}",
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import android.util.Log
|
|||||||
import com.mogo.eagle.core.utilcode.download.DownloadUtils
|
import com.mogo.eagle.core.utilcode.download.DownloadUtils
|
||||||
import com.mogo.eagle.core.utilcode.download.callback.IDownloadListener
|
import com.mogo.eagle.core.utilcode.download.callback.IDownloadListener
|
||||||
import com.mogo.eagle.core.utilcode.util.EncryptUtils
|
import com.mogo.eagle.core.utilcode.util.EncryptUtils
|
||||||
|
import com.mogo.och.common.module.manager.download.DownloadManager
|
||||||
import com.mogo.och.common.module.utils.FileUtils
|
import com.mogo.och.common.module.utils.FileUtils
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
@@ -58,7 +59,7 @@ object MediaFileCacheManager {
|
|||||||
* 获取文件缓存的缓存path, 文件名以base64编码避免 中文命名,重复文件名的影响
|
* 获取文件缓存的缓存path, 文件名以base64编码避免 中文命名,重复文件名的影响
|
||||||
*/
|
*/
|
||||||
fun getCacheFileFullPathByUrl(context: Context, mediaUrl: String): String {
|
fun getCacheFileFullPathByUrl(context: Context, mediaUrl: String): String {
|
||||||
return getFileCacheDir(context) + getCacheFileName(mediaUrl)
|
return getFileCacheDir(context) +File.separator +getCacheFileName(mediaUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,22 +68,14 @@ object MediaFileCacheManager {
|
|||||||
fun isLocalCacheFileExists(context: Context, mediaUrl: String): Boolean {
|
fun isLocalCacheFileExists(context: Context, mediaUrl: String): Boolean {
|
||||||
val localVideoCacheFilePath =
|
val localVideoCacheFilePath =
|
||||||
getCacheFileFullPathByUrl(context, mediaUrl)
|
getCacheFileFullPathByUrl(context, mediaUrl)
|
||||||
|
Log.e(TAG, "文件是否存在,mediaUrl=$mediaUrl------本地文件:${localVideoCacheFilePath}")
|
||||||
return com.mogo.eagle.core.utilcode.util.FileUtils.isFileExists(localVideoCacheFilePath)
|
return com.mogo.eagle.core.utilcode.util.FileUtils.isFileExists(localVideoCacheFilePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下载文件
|
* 下载文件
|
||||||
*/
|
*/
|
||||||
fun downloadFile(context: Context, mediaUrl: String, listener: IDownloadListener) {
|
fun downloadFile(mediaUrl: String, listener: IDownloadListener) {
|
||||||
val downloadUrl = mediaUrl
|
DownloadManager.downloadVideoFile(mediaUrl,listener)
|
||||||
val downloadDir = getFileCacheDir(context)
|
|
||||||
val downloadFileName = getCacheFileName(mediaUrl)
|
|
||||||
DownloadUtils.downLoad(
|
|
||||||
context,
|
|
||||||
downloadUrl,
|
|
||||||
downloadDir,
|
|
||||||
downloadFileName,
|
|
||||||
listener
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,6 +14,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
|||||||
import com.mogo.eagle.core.utilcode.util.CountDownTimer
|
import com.mogo.eagle.core.utilcode.util.CountDownTimer
|
||||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||||
import com.mogo.och.common.module.wigets.media.MediaLoopPlayView.Companion.IMAGE_COUNT_DOWN_SECONDS
|
import com.mogo.och.common.module.wigets.media.MediaLoopPlayView.Companion.IMAGE_COUNT_DOWN_SECONDS
|
||||||
|
import com.mogo.och.common.module.wigets.media.MediaLoopPlayView.Companion.TAG
|
||||||
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
|
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
|
||||||
|
|
||||||
class MediaLoopPlayView @JvmOverloads constructor(
|
class MediaLoopPlayView @JvmOverloads constructor(
|
||||||
@@ -47,6 +48,10 @@ class MediaLoopPlayView @JvmOverloads constructor(
|
|||||||
pagerAdapter?.setNewMediaData(list)
|
pagerAdapter?.setNewMediaData(list)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun setsetHightPriorityMediaItem(list: MutableList<MediaItem>){
|
||||||
|
pagerAdapter?.setSiteInfortion(list)
|
||||||
|
}
|
||||||
|
|
||||||
fun setPause() {
|
fun setPause() {
|
||||||
pagerAdapter?.setPause()
|
pagerAdapter?.setPause()
|
||||||
}
|
}
|
||||||
@@ -81,6 +86,8 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
|
|||||||
//新的数据,在轮播下一次切换的时机完成整体数据的更新
|
//新的数据,在轮播下一次切换的时机完成整体数据的更新
|
||||||
private val mNewDataList: MutableList<MediaItem> = mutableListOf()
|
private val mNewDataList: MutableList<MediaItem> = mutableListOf()
|
||||||
|
|
||||||
|
private var hightPriorityMediaItem: MutableList<MediaItem> = mutableListOf()
|
||||||
|
|
||||||
private var mLastViewPagerPosition = -1
|
private var mLastViewPagerPosition = -1
|
||||||
private var mImageCountDownTimer: CountDownTimer? = null
|
private var mImageCountDownTimer: CountDownTimer? = null
|
||||||
|
|
||||||
@@ -111,6 +118,14 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
|
|||||||
mNewDataList.addAll(list)
|
mNewDataList.addAll(list)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun setSiteInfortion(list: MutableList<MediaItem>){
|
||||||
|
hightPriorityMediaItem = list
|
||||||
|
if(list.isEmpty()){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
startPlayHightPriorityMediaItem(false,1)
|
||||||
|
}
|
||||||
|
|
||||||
override fun getCount(): Int {
|
override fun getCount(): Int {
|
||||||
return mDataList.size
|
return mDataList.size
|
||||||
}
|
}
|
||||||
@@ -144,7 +159,7 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
|
|||||||
mItemViewList.add(imageView)
|
mItemViewList.add(imageView)
|
||||||
} else if (item.isVideoType()) {
|
} else if (item.isVideoType()) {
|
||||||
val videoView = AdvanceVideoView(mContext)
|
val videoView = AdvanceVideoView(mContext)
|
||||||
videoView.initVideoUrlData(item.fileUrl, item.coverImageUrl)
|
videoView.initVideoUrlData(item.fileUrl, item.coverImageUrl,item.priority,item.isTemp)
|
||||||
mItemViewList.add(videoView)
|
mItemViewList.add(videoView)
|
||||||
} else {
|
} else {
|
||||||
MediaPlayLogger.printErrorLog( "addItemView 不支持的文件类型:${item.fileType}")
|
MediaPlayLogger.printErrorLog( "addItemView 不支持的文件类型:${item.fileType}")
|
||||||
@@ -174,6 +189,125 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun startPlayHightPriorityMediaItem(isOnVideoError:Boolean,who:Int){
|
||||||
|
CallerLogger.d(TAG,"检测播放站点介绍:$who")
|
||||||
|
val currentPosition = mViewPager.currentItem
|
||||||
|
if(mItemViewList.isEmpty()){
|
||||||
|
CallerLogger.d(TAG,"view 没有初始化")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(hightPriorityMediaItem.size<1){
|
||||||
|
CallerLogger.d(TAG,"站点视频播放结束没有了")
|
||||||
|
val currentMediaItem = mDataList[currentPosition]
|
||||||
|
// 恢复数据 重新播放
|
||||||
|
when (val itemView = mItemViewList[currentPosition]) {
|
||||||
|
is AdvanceVideoView -> {
|
||||||
|
if(itemView.isTempPlayer){
|
||||||
|
CallerLogger.d(TAG,"删除临时view 和data")
|
||||||
|
mItemViewList.remove(itemView)
|
||||||
|
var tempDeleteItem:MediaItem?=null
|
||||||
|
mDataList.forEach {
|
||||||
|
if(it.isTemp){
|
||||||
|
tempDeleteItem = it
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mDataList.remove(tempDeleteItem)
|
||||||
|
notifyDataSetChanged()
|
||||||
|
mViewPager.currentItem = 0
|
||||||
|
mViewPager.setCurrentItem(0, true)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
CallerLogger.d(TAG,"恢复原有视频播放信息${currentMediaItem}")
|
||||||
|
itemView.onVideoReset()
|
||||||
|
if (isOnVideoError) {
|
||||||
|
// 删除上一个缓存的视频
|
||||||
|
itemView.clearLocalErrorVideo()
|
||||||
|
}
|
||||||
|
itemView.initVideoUrlData(currentMediaItem.fileUrl,currentMediaItem.coverImageUrl,currentMediaItem.priority)
|
||||||
|
itemView.setThumbImageViewVisible()
|
||||||
|
itemView.startPlayVideo(videoPlayLifecycleCallBack)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 播放完高优视频
|
||||||
|
startLoopPlay()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
val currentMediaItem = hightPriorityMediaItem.first()
|
||||||
|
when (val itemView = mItemViewList[currentPosition]) {
|
||||||
|
// 当前正在播放视频
|
||||||
|
is AdvanceVideoView -> {
|
||||||
|
MediaPlayLogger.printInfoLog("startPlayHightPriorityMediaItem: AdvanceVideoView, url=${currentMediaItem.fileUrl}")
|
||||||
|
itemView.onVideoReset()
|
||||||
|
if (isOnVideoError) {
|
||||||
|
// 删除上一个缓存的视频
|
||||||
|
itemView.clearLocalErrorVideo()
|
||||||
|
}
|
||||||
|
itemView.initVideoUrlData(currentMediaItem.fileUrl,currentMediaItem.coverImageUrl,currentMediaItem.priority)
|
||||||
|
itemView.setThumbImageViewVisible()
|
||||||
|
itemView.startPlayVideo(hightPriorityVideoPlayLifecycleCallBack)
|
||||||
|
if(hightPriorityMediaItem.size>0) {
|
||||||
|
hightPriorityMediaItem.removeFirst()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 当前正在播放图片
|
||||||
|
is AdvanceImageView -> {
|
||||||
|
// 正在播放图片
|
||||||
|
MediaPlayLogger.printInfoLog("startPlayHightPriorityMediaItem: AdvanceImageView, url=${currentMediaItem.fileUrl}")
|
||||||
|
// 停止倒计时
|
||||||
|
cancelImageCountDownTimer()
|
||||||
|
// 寻找 视频Item
|
||||||
|
mDataList.forEachIndexed { index, mediaItem ->
|
||||||
|
// 广告中有视频播放器
|
||||||
|
if(mediaItem.fileType==MediaItem.MEDIA_TYPE_VIDEO){
|
||||||
|
mViewPager.post {
|
||||||
|
mViewPager.currentItem = index
|
||||||
|
mViewPager.setCurrentItem(index, true)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CallerLogger.d(TAG,"没有视频VIew 创建临时View 和data")
|
||||||
|
// 当前播放列表中没有视频
|
||||||
|
// TODO: 创建临时view去播放视频
|
||||||
|
val mediaItem = MediaItem(
|
||||||
|
MediaItem.PrioritySite,
|
||||||
|
currentMediaItem.fileUrl,
|
||||||
|
MediaItem.MEDIA_TYPE_VIDEO,
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
true
|
||||||
|
)
|
||||||
|
mDataList.add(mediaItem)
|
||||||
|
addItemView(mediaItem)
|
||||||
|
notifyDataSetChanged()
|
||||||
|
mViewPager.currentItem = mItemViewList.size-1
|
||||||
|
mViewPager.setCurrentItem(mItemViewList.size-1, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> {
|
||||||
|
MediaPlayLogger.printErrorLog("startLoopPlay 不支持的文件类型:${currentMediaItem.fileType}, url=${currentMediaItem.fileUrl}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private var hightPriorityVideoPlayLifecycleCallBack = object : GSYSampleCallBack() {
|
||||||
|
|
||||||
|
override fun onPrepared(url: String?, vararg objects: Any?) {
|
||||||
|
CallerLogger.d(MediaLoopPlayView.TAG, "onPrepared")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onAutoComplete(url: String?, vararg objects: Any?) {
|
||||||
|
CallerLogger.d(MediaLoopPlayView.TAG, "onAutoComplete")
|
||||||
|
startPlayHightPriorityMediaItem(false,3)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPlayError(url: String?, vararg objects: Any?) {
|
||||||
|
super.onPlayError(url, *objects)
|
||||||
|
CallerLogger.d(MediaLoopPlayView.TAG, "onPlayError, error=${objects}")
|
||||||
|
startPlayHightPriorityMediaItem(true,4)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private var videoPlayLifecycleCallBack = object : GSYSampleCallBack() {
|
private var videoPlayLifecycleCallBack = object : GSYSampleCallBack() {
|
||||||
|
|
||||||
override fun onPrepared(url: String?, vararg objects: Any?) {
|
override fun onPrepared(url: String?, vararg objects: Any?) {
|
||||||
@@ -245,7 +379,8 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
|
|||||||
currentItemView.clearLocalErrorVideo()
|
currentItemView.clearLocalErrorVideo()
|
||||||
}
|
}
|
||||||
if (mItemViewList.size == 1) {
|
if (mItemViewList.size == 1) {
|
||||||
currentItemView.startPlay(currentMediaItem.fileUrl)
|
currentItemView.initVideoUrlData(currentMediaItem.fileUrl,currentMediaItem.coverImageUrl,currentMediaItem.priority)
|
||||||
|
currentItemView.startPlayVideo(videoPlayLifecycleCallBack)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -303,7 +438,11 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
|
|||||||
"onPageScrollStateChanged, state = $state, currentItem = $currentPosition, lastPosition = $mLastViewPagerPosition"
|
"onPageScrollStateChanged, state = $state, currentItem = $currentPosition, lastPosition = $mLastViewPagerPosition"
|
||||||
)
|
)
|
||||||
if (mItemViewList.size > 1) { //多于1,才会循环跳转
|
if (mItemViewList.size > 1) { //多于1,才会循环跳转
|
||||||
startLoopPlay()
|
if(hightPriorityMediaItem.size>0){
|
||||||
|
startPlayHightPriorityMediaItem(false,5)
|
||||||
|
}else {
|
||||||
|
startLoopPlay()
|
||||||
|
}
|
||||||
mLastViewPagerPosition = currentPosition
|
mLastViewPagerPosition = currentPosition
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
|||||||
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||||
import com.mogo.och.common.module.R
|
import com.mogo.och.common.module.R
|
||||||
import com.mogo.och.common.module.wigets.media.MediaFileCacheManager
|
import com.mogo.och.common.module.wigets.media.MediaFileCacheManager
|
||||||
|
import com.mogo.och.common.module.wigets.media.MediaItem
|
||||||
import com.mogo.och.common.module.wigets.media.MediaLoopPlayView
|
import com.mogo.och.common.module.wigets.media.MediaLoopPlayView
|
||||||
import com.mogo.och.common.module.wigets.media.MediaPlayLogger
|
import com.mogo.och.common.module.wigets.media.MediaPlayLogger
|
||||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||||
@@ -37,6 +38,9 @@ class AdvanceVideoView @JvmOverloads constructor(
|
|||||||
|
|
||||||
private var thumbnailImageUrl: String = ""
|
private var thumbnailImageUrl: String = ""
|
||||||
private var videoUrl: String = ""
|
private var videoUrl: String = ""
|
||||||
|
private var priority:Int = MediaItem.PrioritySite
|
||||||
|
var isTempPlayer = false
|
||||||
|
private set
|
||||||
|
|
||||||
private val downListener = object : IDownloadListener {
|
private val downListener = object : IDownloadListener {
|
||||||
override fun onStart(url: String) {
|
override fun onStart(url: String) {
|
||||||
@@ -61,7 +65,9 @@ class AdvanceVideoView @JvmOverloads constructor(
|
|||||||
if (url == videoUrl) {
|
if (url == videoUrl) {
|
||||||
//下载完成
|
//下载完成
|
||||||
ThreadUtils.runOnUiThread {
|
ThreadUtils.runOnUiThread {
|
||||||
startPlay(Uri.fromFile(File(path)).toString())
|
if(priority!=MediaItem.PrioritySite) {
|
||||||
|
startPlay(Uri.fromFile(File(path)).toString())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
MediaPlayLogger.printInfoLog("download finished, 开始播放,downloadUrl=${videoUrl}")
|
MediaPlayLogger.printInfoLog("download finished, 开始播放,downloadUrl=${videoUrl}")
|
||||||
} else {//如果当前文件不存在再次去下载当前的
|
} else {//如果当前文件不存在再次去下载当前的
|
||||||
@@ -72,7 +78,9 @@ class AdvanceVideoView @JvmOverloads constructor(
|
|||||||
if (FileUtils.isFileExists(path)) {
|
if (FileUtils.isFileExists(path)) {
|
||||||
Logger.d(MediaLoopPlayView.TAG, "video play download, had download, startPlay")
|
Logger.d(MediaLoopPlayView.TAG, "video play download, had download, startPlay")
|
||||||
ThreadUtils.runOnUiThread {
|
ThreadUtils.runOnUiThread {
|
||||||
startPlay(Uri.fromFile(File(path)).toString())
|
if(priority!=MediaItem.PrioritySite) {
|
||||||
|
startPlay(Uri.fromFile(File(path)).toString())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
MediaPlayLogger.printInfoLog("download finished, 开始播放,downloadUrl=${videoUrl}")
|
MediaPlayLogger.printInfoLog("download finished, 开始播放,downloadUrl=${videoUrl}")
|
||||||
} else {
|
} else {
|
||||||
@@ -116,14 +124,20 @@ class AdvanceVideoView @JvmOverloads constructor(
|
|||||||
containerLayout?.addView(videoPlayerView, videoPlayerViewLayoutParams)
|
containerLayout?.addView(videoPlayerView, videoPlayerViewLayoutParams)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun initVideoUrlData(videoUrl: String, thumbnailImageUrl: String,priority:Int,isTempPlayer:Boolean = false) {
|
||||||
|
this.isTempPlayer = isTempPlayer
|
||||||
|
initVideoUrlData(videoUrl,thumbnailImageUrl,priority)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化数据
|
* 初始化数据
|
||||||
*/
|
*/
|
||||||
fun initVideoUrlData(videoUrl: String, thumbnailImageUrl: String) {
|
fun initVideoUrlData(videoUrl: String, thumbnailImageUrl: String,priority:Int) {
|
||||||
// https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357834634/5.m4v
|
// https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357834634/5.m4v
|
||||||
// https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360274126/10.mp4
|
// https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360274126/10.mp4
|
||||||
this.videoUrl = videoUrl
|
this.videoUrl = videoUrl
|
||||||
this.thumbnailImageUrl = thumbnailImageUrl
|
this.thumbnailImageUrl = thumbnailImageUrl
|
||||||
|
this.priority = priority
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -132,6 +146,19 @@ class AdvanceVideoView @JvmOverloads constructor(
|
|||||||
fun startPlayVideo(onCompletionListener: GSYSampleCallBack) {
|
fun startPlayVideo(onCompletionListener: GSYSampleCallBack) {
|
||||||
//首先根据url检查video是否有已经下载完的本地视频文件
|
//首先根据url检查video是否有已经下载完的本地视频文件
|
||||||
gsyVideoPlayerLifecycleCallback = onCompletionListener
|
gsyVideoPlayerLifecycleCallback = onCompletionListener
|
||||||
|
videoPlayerView?.thumbImageView = thumbnailImageView
|
||||||
|
thumbnailImageView?.setImageResource(R.drawable.video_holder)
|
||||||
|
thumbnailImageView?.also {
|
||||||
|
Glide.with(context).asBitmap().load(thumbnailImageUrl)
|
||||||
|
.apply(
|
||||||
|
RequestOptions().useUnlimitedSourceGeneratorsPool(true)
|
||||||
|
.placeholder(R.drawable.video_holder)
|
||||||
|
.error(R.drawable.video_holder)
|
||||||
|
.fallback(R.drawable.video_holder)
|
||||||
|
.centerCrop()
|
||||||
|
)
|
||||||
|
.into(it)
|
||||||
|
}
|
||||||
if (MediaFileCacheManager.isLocalCacheFileExists(context, this.videoUrl)) {
|
if (MediaFileCacheManager.isLocalCacheFileExists(context, this.videoUrl)) {
|
||||||
val localVideoCacheFilePath = MediaFileCacheManager.getCacheFileFullPathByUrl(
|
val localVideoCacheFilePath = MediaFileCacheManager.getCacheFileFullPathByUrl(
|
||||||
context, this.videoUrl
|
context, this.videoUrl
|
||||||
@@ -144,19 +171,6 @@ class AdvanceVideoView @JvmOverloads constructor(
|
|||||||
MediaLoopPlayView.TAG, "播放视频,videoUri=$realUri"
|
MediaLoopPlayView.TAG, "播放视频,videoUri=$realUri"
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
thumbnailImageView?.setImageResource(R.drawable.video_holder)
|
|
||||||
videoPlayerView?.thumbImageView = thumbnailImageView
|
|
||||||
thumbnailImageView?.also {
|
|
||||||
Glide.with(context).asBitmap().load(thumbnailImageUrl)
|
|
||||||
.apply(
|
|
||||||
RequestOptions().useUnlimitedSourceGeneratorsPool(true)
|
|
||||||
.placeholder(R.drawable.video_holder)
|
|
||||||
.error(R.drawable.video_holder)
|
|
||||||
.fallback(R.drawable.video_holder)
|
|
||||||
.centerCrop()
|
|
||||||
)
|
|
||||||
.into(it)
|
|
||||||
}
|
|
||||||
setThumbImageViewVisible()
|
setThumbImageViewVisible()
|
||||||
|
|
||||||
startDownLoadVideoFile()
|
startDownLoadVideoFile()
|
||||||
@@ -179,11 +193,7 @@ class AdvanceVideoView @JvmOverloads constructor(
|
|||||||
private fun startDownLoadVideoFile() {
|
private fun startDownLoadVideoFile() {
|
||||||
//下载视频,下载成功后再播放
|
//下载视频,下载成功后再播放
|
||||||
MediaPlayLogger.printInfoLog( "startDownLoadVideoFile, downloadUrl=${this.videoUrl}")
|
MediaPlayLogger.printInfoLog( "startDownLoadVideoFile, downloadUrl=${this.videoUrl}")
|
||||||
MediaFileCacheManager.downloadFile(
|
MediaFileCacheManager.downloadFile(videoUrl, downListener)
|
||||||
context,
|
|
||||||
videoUrl,
|
|
||||||
downListener
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun clearLocalErrorVideo() {
|
fun clearLocalErrorVideo() {
|
||||||
@@ -199,7 +209,7 @@ class AdvanceVideoView @JvmOverloads constructor(
|
|||||||
Logger.d(MediaLoopPlayView.TAG, "startPlay")
|
Logger.d(MediaLoopPlayView.TAG, "startPlay")
|
||||||
gsyVideoPlayerOptionBuilder = GSYVideoOptionBuilder()
|
gsyVideoPlayerOptionBuilder = GSYVideoOptionBuilder()
|
||||||
gsyVideoPlayerOptionBuilder
|
gsyVideoPlayerOptionBuilder
|
||||||
?.setUrl(localVideoPath) // "/data/user/0/com.mogo.launcher.f/files/video/"
|
?.setUrl(localVideoPath) // "/sdcard/mogo/media"
|
||||||
?.setPlayTag(MediaFileCacheManager.getCacheFileName(videoUrl))
|
?.setPlayTag(MediaFileCacheManager.getCacheFileName(videoUrl))
|
||||||
?.setCacheWithPlay(false)
|
?.setCacheWithPlay(false)
|
||||||
?.setThumbPlay(false)
|
?.setThumbPlay(false)
|
||||||
|
|||||||
@@ -3,11 +3,19 @@ package com.mogo.och.common.module.wigets.media
|
|||||||
import com.mogo.commons.mvp.MvpFragment
|
import com.mogo.commons.mvp.MvpFragment
|
||||||
import com.mogo.commons.mvp.Presenter
|
import com.mogo.commons.mvp.Presenter
|
||||||
import com.mogo.eagle.core.function.main.MainMoGoApplication
|
import com.mogo.eagle.core.function.main.MainMoGoApplication
|
||||||
|
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||||
|
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||||
import com.mogo.och.common.module.R
|
import com.mogo.och.common.module.R
|
||||||
|
import com.mogo.och.common.module.biz.media.IMediaDispatch
|
||||||
|
import com.mogo.och.common.module.biz.media.MediaManager
|
||||||
|
import com.mogo.och.common.module.manager.download.DownloadManager
|
||||||
|
import com.mogo.och.common.module.utils.RxUtils
|
||||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||||
|
import io.reactivex.disposables.Disposable
|
||||||
|
import kotlinx.android.synthetic.main.fragment_video_player.acb_add_site_video
|
||||||
import kotlinx.android.synthetic.main.fragment_video_player.imageVideoRotationView
|
import kotlinx.android.synthetic.main.fragment_video_player.imageVideoRotationView
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -15,7 +23,7 @@ import kotlinx.android.synthetic.main.fragment_video_player.imageVideoRotationVi
|
|||||||
* @date: 2022/4/12
|
* @date: 2022/4/12
|
||||||
*/
|
*/
|
||||||
class MediaPlayerFragment :
|
class MediaPlayerFragment :
|
||||||
MvpFragment<MediaPlayerFragment?, MediaPlayerPresenter?>() {
|
MvpFragment<MediaPlayerFragment?, MediaPlayerPresenter?>(), IMediaDispatch {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val TAG = MediaPlayerFragment::class.java.simpleName
|
private val TAG = MediaPlayerFragment::class.java.simpleName
|
||||||
@@ -36,6 +44,13 @@ class MediaPlayerFragment :
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun initViews() {
|
override fun initViews() {
|
||||||
|
acb_add_site_video.onClick {
|
||||||
|
val siteList = mutableListOf<MediaItem>()
|
||||||
|
// siteList.add(MediaItem(MediaItem.PrioritySite,"https://img.zhidaozhixing.com/fileServer/defaultPath/b47f361c3de6ea490f3086407fc0376f/a1%E8%B7%AF%E7%BA%BF%281%29.mp4",MediaItem.MEDIA_TYPE_VIDEO,"","title"))
|
||||||
|
siteList.add(MediaItem(MediaItem.PrioritySite,"https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357557335/3.mp4",MediaItem.MEDIA_TYPE_VIDEO,"","title"))
|
||||||
|
setHightPriorityMediaItem(siteList)
|
||||||
|
}
|
||||||
|
MediaManager.addListener(TAG,this)
|
||||||
MediaFileCacheManager.createFileCacheDir(MainMoGoApplication.getApp().applicationContext)
|
MediaFileCacheManager.createFileCacheDir(MainMoGoApplication.getApp().applicationContext)
|
||||||
MediaDataSourceManager.init(TAG, object : IMediaDataSourceListener {
|
MediaDataSourceManager.init(TAG, object : IMediaDataSourceListener {
|
||||||
override fun onMediaDataSourceChanged(list: List<MediaItem>) {
|
override fun onMediaDataSourceChanged(list: List<MediaItem>) {
|
||||||
@@ -56,6 +71,22 @@ class MediaPlayerFragment :
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun setHightPriorityMediaItem(list: MutableList<MediaItem>){
|
||||||
|
context?.let {context->
|
||||||
|
val cacheList = list.filter {
|
||||||
|
if(!MediaFileCacheManager.isLocalCacheFileExists(context,it.fileUrl)){
|
||||||
|
DownloadManager.downloadVideoFile(it.fileUrl,null)
|
||||||
|
}
|
||||||
|
MediaFileCacheManager.isLocalCacheFileExists(context,it.fileUrl)
|
||||||
|
}
|
||||||
|
ThreadUtils.runOnUiThread {
|
||||||
|
imageVideoRotationView.setsetHightPriorityMediaItem(cacheList.toMutableList())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
super.onPause()
|
super.onPause()
|
||||||
imageVideoRotationView.setPause()
|
imageVideoRotationView.setPause()
|
||||||
@@ -69,8 +100,19 @@ class MediaPlayerFragment :
|
|||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
MediaDataSourceManager.unInit(TAG)
|
MediaDataSourceManager.unInit(TAG)
|
||||||
GSYVideoManager.releaseAllVideos()
|
GSYVideoManager.releaseAllVideos()
|
||||||
|
MediaManager.removeListener(TAG)
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var fisrtData: Disposable? = null
|
||||||
|
|
||||||
|
override fun diapatchMedia(list: MutableList<MediaItem>) {
|
||||||
|
if(RxUtils.isNotDisposed(fisrtData)){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
fisrtData = RxUtils.createSubscribe(3_000) {}
|
||||||
|
setHightPriorityMediaItem(list)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MediaPlayerPresenter(view: MediaPlayerFragment?) :
|
class MediaPlayerPresenter(view: MediaPlayerFragment?) :
|
||||||
|
|||||||
BIN
OCH/common/common/src/main/res/drawable-nodpi/common_dialog_close.png
Executable file
BIN
OCH/common/common/src/main/res/drawable-nodpi/common_dialog_close.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 409 B |
BIN
OCH/common/common/src/main/res/drawable-nodpi/common_feedback_fail.png
Executable file
BIN
OCH/common/common/src/main/res/drawable-nodpi/common_feedback_fail.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 6.0 KiB |
BIN
OCH/common/common/src/main/res/drawable-nodpi/common_feedback_success.png
Executable file
BIN
OCH/common/common/src/main/res/drawable-nodpi/common_feedback_success.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@drawable/common_button_cancle_click" android:state_pressed="true"/>
|
||||||
|
<item android:drawable="@drawable/common_button_cancle_normal" android:state_pressed="false"/>
|
||||||
|
<item android:drawable="@drawable/common_button_cancle_normal"/>
|
||||||
|
</selector>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<solid android:color="@color/common_color_99000000"/>
|
||||||
|
<corners android:radius="@dimen/dp_30"/>
|
||||||
|
</shape>
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<solid android:color="@color/common_color_4D000000"/>
|
||||||
|
<corners android:radius="@dimen/dp_30"/>
|
||||||
|
</shape>
|
||||||
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<gradient android:startColor="@color/common_3B3D44" android:endColor="@color/common_2E323A" android:angle="270"/>
|
||||||
|
<stroke android:color="@color/color_666C6C6C" android:width="@dimen/dp_2"/>
|
||||||
|
<corners android:radius="@dimen/dp_50"/>
|
||||||
|
</shape>
|
||||||
|
|
||||||
@@ -1,20 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<com.mogo.och.common.module.wigets.OCHRoundConstraintLayout
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="@dimen/dp_890"
|
|
||||||
android:layout_height="@dimen/dp_780"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
tools:ignore="MissingDefaultResource"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:background="@drawable/bind_driver_qr_bg">
|
android:layout_width="@dimen/dp_900"
|
||||||
|
android:layout_height="@dimen/dp_745"
|
||||||
|
android:background="@drawable/common_qr_dialog"
|
||||||
|
app:roundLayoutRadius="@dimen/dp_50">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/qr_title"
|
android:id="@+id/qr_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/bind_driver_qr_title"
|
android:text="@string/bind_driver_qr_title"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textSize="@dimen/dp_56"
|
android:textSize="@dimen/dp_45"
|
||||||
android:layout_marginTop="@dimen/dp_48"
|
android:layout_marginTop="@dimen/dp_75"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
@@ -23,33 +24,27 @@
|
|||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/qr_bm"
|
android:id="@+id/qr_bm"
|
||||||
android:layout_width="@dimen/dp_357"
|
android:layout_width="@dimen/dp_300"
|
||||||
android:layout_height="@dimen/dp_357"
|
android:layout_height="@dimen/dp_300"
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:background="@android:color/white"
|
android:background="@android:color/white"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/qr_title"
|
app:layout_constraintTop_toBottomOf="@+id/qr_title"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/line"/>
|
app:layout_constraintBottom_toTopOf="@+id/bind_qr_cancel"/>
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/line"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="2px"
|
|
||||||
android:background="@color/qr_line_bg_color"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/bind_qr_cancel"
|
|
||||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/bind_qr_cancel"
|
android:id="@+id/bind_qr_cancel"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="@dimen/dp_356"
|
||||||
android:layout_height="@dimen/dp_162"
|
android:layout_height="@dimen/dp_120"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:background="@drawable/common_button_cancle"
|
||||||
android:text="@string/qr_cancel"
|
android:text="@string/qr_cancel"
|
||||||
android:textSize="@dimen/dp_52"
|
android:textSize="@dimen/dp_52"
|
||||||
|
android:layout_marginBottom="@dimen/dp_65"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
android:textColor="@android:color/white" />
|
android:textColor="@android:color/white" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</com.mogo.och.common.module.wigets.OCHRoundConstraintLayout>
|
||||||
@@ -8,6 +8,16 @@
|
|||||||
android:background="@drawable/bg_bone_dialog"
|
android:background="@drawable/bg_bone_dialog"
|
||||||
app:roundLayoutRadius="@dimen/dp_50">
|
app:roundLayoutRadius="@dimen/dp_50">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/common_dialog_close"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:src="@drawable/common_dialog_close"
|
||||||
|
android:layout_marginEnd="@dimen/dp_50"
|
||||||
|
android:layout_marginTop="@dimen/dp_50"
|
||||||
|
android:layout_width="@dimen/dp_60"
|
||||||
|
android:layout_height="@dimen/dp_60"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/common_dialog_status"
|
android:id="@+id/common_dialog_status"
|
||||||
android:layout_width="@dimen/dp_140"
|
android:layout_width="@dimen/dp_140"
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="@dimen/dp_439"
|
||||||
|
android:layout_height="@dimen/dp_333"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_gravity="center">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_feedback_status"
|
||||||
|
android:layout_width="@dimen/dp_140"
|
||||||
|
android:layout_height="@dimen/dp_140"
|
||||||
|
android:src="@drawable/common_feedback_success" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_feedback_status_describe"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="打点成功"
|
||||||
|
android:textSize="@dimen/dp_38"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:layout_marginTop="@dimen/dp_28"/>
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@@ -1,10 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
<!-- 图片或视频广告-->
|
<!-- 图片或视频广告-->
|
||||||
<com.mogo.och.common.module.wigets.media.MediaLoopPlayView
|
<com.mogo.och.common.module.wigets.media.MediaLoopPlayView
|
||||||
android:id="@+id/imageVideoRotationView"
|
android:id="@+id/imageVideoRotationView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
|
android:id="@+id/acb_add_site_video"
|
||||||
|
android:text="添加视频"
|
||||||
|
android:gravity="center"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:layout_width="@dimen/dp_100"
|
||||||
|
android:layout_height="@dimen/dp_30"/>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
<color name="taxi_111533">#111533</color>
|
<color name="taxi_111533">#111533</color>
|
||||||
<color name="taxi_878890">#878890</color>
|
<color name="taxi_878890">#878890</color>
|
||||||
<color name="taxi_EF262C">#EF262C</color>
|
<color name="taxi_EF262C">#EF262C</color>
|
||||||
<color name="taxi_4D000000">#4D000000</color>
|
<color name="common_color_4D000000">#4D000000</color>
|
||||||
|
<color name="common_color_99000000">#99000000</color>
|
||||||
|
|
||||||
<color name="och_dialog_bg_color">#3B4577</color>
|
<color name="och_dialog_bg_color">#3B4577</color>
|
||||||
|
|
||||||
@@ -35,4 +36,6 @@
|
|||||||
<color name="common_B3FFFFFF">#B3FFFFFF</color>
|
<color name="common_B3FFFFFF">#B3FFFFFF</color>
|
||||||
<color name="common_cccccc">#CCCCCC</color>
|
<color name="common_cccccc">#CCCCCC</color>
|
||||||
<color name="common_f7151d41">#F7151D41</color>
|
<color name="common_f7151d41">#F7151D41</color>
|
||||||
|
<color name="common_3B3D44">#3B3D44</color>
|
||||||
|
<color name="common_2E323A">#2E323A</color>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<string name="request_error_tip">请求出现异常,请稍后重试</string>
|
<string name="request_error_tip">请求出现异常,请稍后重试</string>
|
||||||
|
|
||||||
<string name="qr_cancel">取消</string>
|
<string name="qr_cancel">取消</string>
|
||||||
<string name="bind_driver_qr_title">扫描二维码完成车辆绑定</string>
|
<string name="bind_driver_qr_title">请扫码绑定</string>
|
||||||
|
|
||||||
<string name="common_change2_autopilot2_manual">自动驾驶已退出,请立即接管,注意周边环境 小心驾驶</string>
|
<string name="common_change2_autopilot2_manual">自动驾驶已退出,请立即接管,注意周边环境 小心驾驶</string>
|
||||||
<string name="common_change2_pxjs_manual">平行驾驶已退出,请立即接管,注意周边环境 小心驾驶</string>
|
<string name="common_change2_pxjs_manual">平行驾驶已退出,请立即接管,注意周边环境 小心驾驶</string>
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package com.mogo.och.data.bean;
|
package com.mogo.och.data.bean;
|
||||||
|
|
||||||
|
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -21,6 +26,7 @@ public class BusStationBean {
|
|||||||
private String introduction;// 站点简介
|
private String introduction;// 站点简介
|
||||||
private boolean isPlayTts;
|
private boolean isPlayTts;
|
||||||
private int pointType; // 1:途径点 2:禁行点 3:站点
|
private int pointType; // 1:途径点 2:禁行点 3:站点
|
||||||
|
private List<SiteIntroduce> videoList;
|
||||||
|
|
||||||
public String getNameKr() {
|
public String getNameKr() {
|
||||||
return nameKr;
|
return nameKr;
|
||||||
@@ -118,6 +124,14 @@ public class BusStationBean {
|
|||||||
isPlayTts = playTts;
|
isPlayTts = playTts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<SiteIntroduce> getVideoList() {
|
||||||
|
return videoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoList(List<SiteIntroduce> videoList) {
|
||||||
|
this.videoList = videoList;
|
||||||
|
}
|
||||||
|
|
||||||
public int getPointType() {
|
public int getPointType() {
|
||||||
return pointType;
|
return pointType;
|
||||||
}
|
}
|
||||||
@@ -130,23 +144,40 @@ public class BusStationBean {
|
|||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o) return true;
|
if (this == o) return true;
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
BusStationBean that = (BusStationBean) o;
|
BusStationBean that = (BusStationBean) o;
|
||||||
return siteId == that.siteId
|
return siteId == that.siteId
|
||||||
&& seq == that.seq
|
&& seq == that.seq
|
||||||
&& Double.compare(that.gcjLon, gcjLon) == 0
|
&& Double.compare(gcjLon, that.gcjLon) == 0
|
||||||
&& Double.compare(that.gcjLat, gcjLat) == 0
|
&& Double.compare(gcjLat, that.gcjLat) == 0
|
||||||
&& Double.compare(that.lon, lon) == 0
|
&& Double.compare(lon, that.lon) == 0
|
||||||
&& Double.compare(that.lat, lat) == 0
|
&& Double.compare(lat, that.lat) == 0
|
||||||
&& drivingStatus == that.drivingStatus
|
&& drivingStatus == that.drivingStatus
|
||||||
&& leaving == that.leaving
|
&& leaving == that.leaving && isPlayTts == that.isPlayTts
|
||||||
&& pointType == that.pointType
|
&& pointType == that.pointType
|
||||||
&& name.equals(that.name)
|
&& Objects.equals(name, that.name)
|
||||||
&& (nameKr == null || nameKr.equals(that.nameKr));
|
&& Objects.equals(nameKr, that.nameKr)
|
||||||
|
&& Objects.equals(introduction, that.introduction)
|
||||||
|
&& Objects.equals(videoList, that.videoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(siteId, name, nameKr, seq, gcjLon, gcjLat, lon, lat, drivingStatus, leaving,pointType);
|
int result = siteId;
|
||||||
|
result = 31 * result + Objects.hashCode(name);
|
||||||
|
result = 31 * result + Objects.hashCode(nameKr);
|
||||||
|
result = 31 * result + seq;
|
||||||
|
result = 31 * result + Double.hashCode(gcjLon);
|
||||||
|
result = 31 * result + Double.hashCode(gcjLat);
|
||||||
|
result = 31 * result + Double.hashCode(lon);
|
||||||
|
result = 31 * result + Double.hashCode(lat);
|
||||||
|
result = 31 * result + drivingStatus;
|
||||||
|
result = 31 * result + Boolean.hashCode(leaving);
|
||||||
|
result = 31 * result + Objects.hashCode(introduction);
|
||||||
|
result = 31 * result + Boolean.hashCode(isPlayTts);
|
||||||
|
result = 31 * result + pointType;
|
||||||
|
result = 31 * result + Objects.hashCode(videoList);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -165,6 +196,15 @@ public class BusStationBean {
|
|||||||
", introduction='" + introduction + '\'' +
|
", introduction='" + introduction + '\'' +
|
||||||
", isPlayTts=" + isPlayTts +
|
", isPlayTts=" + isPlayTts +
|
||||||
", pointType=" + pointType +
|
", pointType=" + pointType +
|
||||||
|
", videoList=" + videoList +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public MogoLocation toMogoLocation() {
|
||||||
|
MogoLocation result = new MogoLocation();
|
||||||
|
result.setLatitude(gcjLat);
|
||||||
|
result.setLongitude(gcjLon);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.mogo.och.data.bean;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class SiteIntroduce {
|
||||||
|
private int type;
|
||||||
|
private String url;
|
||||||
|
private int seq;
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSeq() {
|
||||||
|
return seq;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSeq(int seq) {
|
||||||
|
this.seq = seq;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
|
SiteIntroduce that = (SiteIntroduce) o;
|
||||||
|
return type == that.type && seq == that.seq && Objects.equals(url, that.url);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = type;
|
||||||
|
result = 31 * result + Objects.hashCode(url);
|
||||||
|
result = 31 * result + seq;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "SiteIntroduce{" +
|
||||||
|
"type=" + type +
|
||||||
|
", url='" + url + '\'' +
|
||||||
|
", seq=" + seq +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import android.content.Context
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route
|
import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
|
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||||
@@ -17,6 +18,7 @@ import com.mogo.och.weaknet.repository.db.repository.TaskSiteDb
|
|||||||
import com.mogo.och.weaknet.ui.fragment.ShuttleFragment
|
import com.mogo.och.weaknet.ui.fragment.ShuttleFragment
|
||||||
import com.mogo.och.weaknet.model.LineModel
|
import com.mogo.och.weaknet.model.LineModel
|
||||||
import com.mogo.och.weaknet.ui.bizswitch.SwitchBizView
|
import com.mogo.och.weaknet.ui.bizswitch.SwitchBizView
|
||||||
|
import com.mogo.och.weaknet.ui.qr.QrOpenView
|
||||||
import com.mogo.och.weaknet.util.BusAnalyticsManager
|
import com.mogo.och.weaknet.util.BusAnalyticsManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -60,4 +62,13 @@ class ShuttleDriverProvider : CommonServiceImpl() {
|
|||||||
SwitchBizView(it)
|
SwitchBizView(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun createOchBindQRCodeView(context: Context?): View? {
|
||||||
|
if (FunctionBuildConfig.urlJson.bindDriverQRUrl.isNullOrEmpty()) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
return context?.let {
|
||||||
|
QrOpenView(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,27 +137,7 @@ class ShuttleFragment : MvpFragment<ShuttleFragment?, BusPresenter?>() {
|
|||||||
fun changeOverview(eventLogout: EventLogout) {
|
fun changeOverview(eventLogout: EventLogout) {
|
||||||
when (eventLogout.messgae) {
|
when (eventLogout.messgae) {
|
||||||
EventLogout.SHOW_QR_TYPE-> { //显示二维码
|
EventLogout.SHOW_QR_TYPE-> { //显示二维码
|
||||||
d(
|
|
||||||
SceneConstant.M_BUS + TAG, "changeOverview Event qrcode,sn = "
|
|
||||||
+ SharedPrefsMgr.getInstance().sn
|
|
||||||
)
|
|
||||||
val qrUrl = String.format(
|
|
||||||
FunctionBuildConfig.urlJson.bindDriverQRUrl,
|
|
||||||
SharedPrefsMgr.getInstance().sn
|
|
||||||
)
|
|
||||||
val bmQr = createQRCodeWithPicture(
|
|
||||||
BitmapFactory.decodeResource(resources, R.drawable.icon_qr_center_logo),
|
|
||||||
qrUrl, AutoSizeUtils.dp2px(context, 340f),
|
|
||||||
AutoSizeUtils.dp2px(context, 340f), true
|
|
||||||
)
|
|
||||||
if (bmQr != null) {
|
|
||||||
val builder = BindQRCodeDialog.Builder()
|
|
||||||
builder.title(getString(R.string.bind_driver_qr_title))
|
|
||||||
.cancelStr(getString(R.string.qr_cancel))
|
|
||||||
.qrBm(bmQr).build(AbsMogoApplication.getApp())!!.show()
|
|
||||||
} else {
|
|
||||||
d(SceneConstant.M_BUS + TAG, "bmQr = null ")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
EventLogout.SHOW_WAIT_UPLOAD_TASK-> {
|
EventLogout.SHOW_WAIT_UPLOAD_TASK-> {
|
||||||
context?.let {
|
context?.let {
|
||||||
|
|||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.mogo.och.weaknet.ui.qr
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.graphics.BitmapFactory
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import androidx.appcompat.widget.AppCompatImageView
|
||||||
|
import com.mogo.commons.AbsMogoApplication
|
||||||
|
import com.mogo.commons.storage.SharedPrefsMgr
|
||||||
|
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||||
|
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||||
|
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||||
|
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||||
|
import com.mogo.och.common.module.utils.ResourcesUtils
|
||||||
|
import com.mogo.och.common.module.utils.createQRCodeWithPicture
|
||||||
|
import com.mogo.och.common.module.wigets.BindQRCodeDialog
|
||||||
|
import com.mogo.och.shuttle.weaknet.R
|
||||||
|
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||||
|
|
||||||
|
class QrOpenView : AppCompatImageView {
|
||||||
|
|
||||||
|
private val TAG = "QrOpenView"
|
||||||
|
|
||||||
|
constructor(context: Context) : super(context)
|
||||||
|
|
||||||
|
constructor(context: Context, attributeSet: AttributeSet) : super(context, attributeSet)
|
||||||
|
|
||||||
|
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int) : super(
|
||||||
|
context,
|
||||||
|
attributeSet,
|
||||||
|
defStyleAttr
|
||||||
|
)
|
||||||
|
|
||||||
|
private fun initView() {
|
||||||
|
setImageResource(R.drawable.bus_open_qr)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onAttachedToWindow() {
|
||||||
|
super.onAttachedToWindow()
|
||||||
|
|
||||||
|
onClick {
|
||||||
|
d(
|
||||||
|
SceneConstant.M_BUS + TAG, "changeOverview Event qrcode,sn = "
|
||||||
|
+ SharedPrefsMgr.getInstance().sn
|
||||||
|
)
|
||||||
|
val qrUrl = String.format(
|
||||||
|
FunctionBuildConfig.urlJson.bindDriverQRUrl,
|
||||||
|
SharedPrefsMgr.getInstance().sn
|
||||||
|
)
|
||||||
|
val bmQr = createQRCodeWithPicture(
|
||||||
|
BitmapFactory.decodeResource(resources, R.drawable.icon_qr_center_logo),
|
||||||
|
qrUrl, AutoSizeUtils.dp2px(context, 340f),
|
||||||
|
AutoSizeUtils.dp2px(context, 340f), true
|
||||||
|
)
|
||||||
|
if (bmQr != null) {
|
||||||
|
val builder = BindQRCodeDialog.Builder()
|
||||||
|
builder.title(ResourcesUtils.getString(R.string.bind_driver_qr_title))
|
||||||
|
.cancelStr(ResourcesUtils.getString(R.string.qr_cancel))
|
||||||
|
.qrBm(bmQr).build(AbsMogoApplication.getApp())!!.show()
|
||||||
|
} else {
|
||||||
|
d(SceneConstant.M_BUS + TAG, "bmQr = null ")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
init {
|
||||||
|
try {
|
||||||
|
initView()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@ import com.mogo.och.weaknet.ui.switchline.SwitchLineAdapter.SwitchLineViewHolder
|
|||||||
import com.mogo.och.shuttle.weaknet.R
|
import com.mogo.och.shuttle.weaknet.R
|
||||||
import com.mogo.och.weaknet.repository.db.bean.LineDataBean
|
import com.mogo.och.weaknet.repository.db.bean.LineDataBean
|
||||||
import com.mogo.och.weaknet.repository.db.bean.TaskDataBean
|
import com.mogo.och.weaknet.repository.db.bean.TaskDataBean
|
||||||
|
import me.jessyan.autosize.AutoSizeCompat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 路线列表adapter
|
* 路线列表adapter
|
||||||
@@ -50,6 +51,7 @@ class SwitchLineAdapter(
|
|||||||
|
|
||||||
override fun onBindViewHolder(holder: SwitchLineViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: SwitchLineViewHolder, position: Int) {
|
||||||
val currentPosition = holder.bindingAdapterPosition
|
val currentPosition = holder.bindingAdapterPosition
|
||||||
|
AutoSizeCompat.autoConvertDensityOfGlobal(holder.itemView.resources)
|
||||||
val line = mData[currentPosition]
|
val line = mData[currentPosition]
|
||||||
|
|
||||||
holder.lineName.text = line.lineName
|
holder.lineName.text = line.lineName
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.mogo.och.common.module.manager.loop.BizLoopManager
|
|||||||
import com.mogo.och.weaknet.ui.switchtask.SwitchLineTaskAdapter.SwitchLineTaskViewHolder
|
import com.mogo.och.weaknet.ui.switchtask.SwitchLineTaskAdapter.SwitchLineTaskViewHolder
|
||||||
import com.mogo.och.shuttle.weaknet.R
|
import com.mogo.och.shuttle.weaknet.R
|
||||||
import com.mogo.och.weaknet.repository.db.bean.TaskDataBean
|
import com.mogo.och.weaknet.repository.db.bean.TaskDataBean
|
||||||
|
import me.jessyan.autosize.AutoSizeCompat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 路线列表adapter
|
* 路线列表adapter
|
||||||
@@ -49,6 +50,7 @@ class SwitchLineTaskAdapter(
|
|||||||
|
|
||||||
override fun onBindViewHolder(holder: SwitchLineTaskViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: SwitchLineTaskViewHolder, position: Int) {
|
||||||
val currentPosition = holder.bindingAdapterPosition
|
val currentPosition = holder.bindingAdapterPosition
|
||||||
|
AutoSizeCompat.autoConvertDensityOfGlobal(holder.itemView.resources)
|
||||||
val task = mData[currentPosition]
|
val task = mData[currentPosition]
|
||||||
val taskStartTime = TimeUtils.millis2String(task.taskStartTime?:System.currentTimeMillis(), "HH:mm")
|
val taskStartTime = TimeUtils.millis2String(task.taskStartTime?:System.currentTimeMillis(), "HH:mm")
|
||||||
holder.taskTime.text = taskStartTime
|
holder.taskTime.text = taskStartTime
|
||||||
|
|||||||
@@ -6,9 +6,7 @@ import android.view.LayoutInflater
|
|||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
|
||||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
|
||||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||||
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
||||||
@@ -52,7 +50,7 @@ class SwitchTaskView: WindowRelativeLayout, SwtichTaskModel.SwtichLineViewCallba
|
|||||||
|
|
||||||
private lateinit var mAdapter: SwitchLineTaskAdapter
|
private lateinit var mAdapter: SwitchLineTaskAdapter
|
||||||
|
|
||||||
private lateinit var linearLayoutManager:LinearLayoutManager
|
private lateinit var linearLayoutManager:GridLayoutManager
|
||||||
|
|
||||||
init {
|
init {
|
||||||
LayoutInflater.from(context).inflate(R.layout.shuttle_weak_switch_task, this, true)
|
LayoutInflater.from(context).inflate(R.layout.shuttle_weak_switch_task, this, true)
|
||||||
@@ -60,7 +58,7 @@ class SwitchTaskView: WindowRelativeLayout, SwtichTaskModel.SwtichLineViewCallba
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun initView(){
|
private fun initView(){
|
||||||
linearLayoutManager = GridLayoutManager(context, 3)
|
linearLayoutManager = GridLayoutManager(context, 3)
|
||||||
rv_switch_task.setLayoutManager(linearLayoutManager)
|
rv_switch_task.setLayoutManager(linearLayoutManager)
|
||||||
mAdapter = SwitchLineTaskAdapter(context,null, mutableListOf())
|
mAdapter = SwitchLineTaskAdapter(context,null, mutableListOf())
|
||||||
rv_switch_task.setAdapter(mAdapter)
|
rv_switch_task.setAdapter(mAdapter)
|
||||||
|
|||||||
@@ -6,13 +6,12 @@ import android.view.LayoutInflater
|
|||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
|
||||||
import com.mogo.commons.AbsMogoApplication
|
import com.mogo.commons.AbsMogoApplication
|
||||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||||
import com.mogo.och.common.module.manager.autopilot.line.LineManager
|
import com.mogo.och.common.module.manager.autopilot.line.LineManager
|
||||||
import com.mogo.och.common.module.utils.ResourcesUtils
|
import com.mogo.och.common.module.utils.ResourcesUtils
|
||||||
import com.mogo.och.common.module.wigets.CommonDialogStatus
|
import com.mogo.och.common.module.wigets.dialog.CommonDialogStatus
|
||||||
import com.mogo.och.common.module.wigets.CommonSlideView
|
import com.mogo.och.common.module.wigets.CommonSlideView
|
||||||
import com.mogo.och.common.module.wigets.WrapContentLinearLayoutManager
|
import com.mogo.och.common.module.wigets.WrapContentLinearLayoutManager
|
||||||
import com.mogo.och.shuttle.weaknet.R
|
import com.mogo.och.shuttle.weaknet.R
|
||||||
@@ -26,7 +25,6 @@ import kotlinx.android.synthetic.main.shuttle_weak_task_running.view.actv_runnin
|
|||||||
import kotlinx.android.synthetic.main.shuttle_weak_task_running.view.bus_task_running_line_name
|
import kotlinx.android.synthetic.main.shuttle_weak_task_running.view.bus_task_running_line_name
|
||||||
import kotlinx.android.synthetic.main.shuttle_weak_task_running.view.loading_arrive_station
|
import kotlinx.android.synthetic.main.shuttle_weak_task_running.view.loading_arrive_station
|
||||||
import kotlinx.android.synthetic.main.shuttle_weak_task_running.view.rl_running_task_station_list
|
import kotlinx.android.synthetic.main.shuttle_weak_task_running.view.rl_running_task_station_list
|
||||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
|
||||||
|
|
||||||
|
|
||||||
class TaskRunningView: ConstraintLayout, TaskRunningModel.SwtichLineViewCallback {
|
class TaskRunningView: ConstraintLayout, TaskRunningModel.SwtichLineViewCallback {
|
||||||
|
|||||||
BIN
OCH/shuttle/driver_weaknet/src/main/res/drawable-nodpi/bus_open_qr.png
Executable file
BIN
OCH/shuttle/driver_weaknet/src/main/res/drawable-nodpi/bus_open_qr.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -5,9 +5,13 @@ import android.view.LayoutInflater
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.CheckBox
|
import android.widget.CheckBox
|
||||||
|
import androidx.appcompat.widget.AppCompatImageView
|
||||||
|
import androidx.appcompat.widget.AppCompatTextView
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||||
import com.mogo.och.unmanned.taxi.R
|
import com.mogo.och.unmanned.taxi.R
|
||||||
import com.mogo.och.unmanned.taxi.bean.PointError
|
import com.mogo.och.unmanned.taxi.bean.PointError
|
||||||
|
import me.jessyan.autosize.AutoSizeCompat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by yangyakun on 06/06/17.
|
* Created by yangyakun on 06/06/17.
|
||||||
@@ -42,12 +46,16 @@ class ErrorPointItemAdapter(
|
|||||||
|
|
||||||
override fun onBindViewHolder(holder: TextVH, position: Int) {
|
override fun onBindViewHolder(holder: TextVH, position: Int) {
|
||||||
val errorInfo = dataList[holder.bindingAdapterPosition]
|
val errorInfo = dataList[holder.bindingAdapterPosition]
|
||||||
holder.cbErrorInfo.text = errorInfo.name
|
AutoSizeCompat.autoConvertDensityOfGlobal(holder.itemView.resources)
|
||||||
holder.cbErrorInfo.isChecked = errorInfo.isCheck
|
if (errorInfo.isCheck) {
|
||||||
holder.cbErrorInfo.setOnCheckedChangeListener { buttonView, isChecked ->
|
holder.cbErrorInfo.setImageResource(R.drawable.taxi_routing_check)
|
||||||
if(buttonView==holder.cbErrorInfo){
|
}else{
|
||||||
errorInfo.isCheck = isChecked
|
holder.cbErrorInfo.setImageResource(R.drawable.taxi_routing_uncheck)
|
||||||
}
|
}
|
||||||
|
holder.cbErrorResong.text = errorInfo.name
|
||||||
|
holder.itemView.onClick {
|
||||||
|
errorInfo.isCheck = !errorInfo.isCheck
|
||||||
|
notifyItemChanged(holder.bindingAdapterPosition)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,9 +64,7 @@ class ErrorPointItemAdapter(
|
|||||||
}
|
}
|
||||||
|
|
||||||
inner class TextVH(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
inner class TextVH(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||||
var cbErrorInfo: CheckBox
|
var cbErrorInfo: AppCompatImageView = itemView.findViewById(R.id.aciv_show_check_status)
|
||||||
init {
|
var cbErrorResong: AppCompatTextView = itemView.findViewById(R.id.actv_error_resong)
|
||||||
cbErrorInfo = itemView.findViewById(R.id.cb_error_info)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@ import android.content.Context
|
|||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import com.google.android.flexbox.AlignItems
|
import com.google.android.flexbox.AlignItems
|
||||||
import com.google.android.flexbox.FlexDirection
|
import com.google.android.flexbox.FlexDirection
|
||||||
import com.google.android.flexbox.FlexWrap
|
import com.google.android.flexbox.FlexWrap
|
||||||
@@ -14,9 +15,11 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
|||||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||||
import com.mogo.och.common.module.wigets.WindowRelativeLayout
|
import com.mogo.och.common.module.wigets.WindowRelativeLayout
|
||||||
|
import com.mogo.och.common.module.wigets.dialog.CommonFeedbackDialog
|
||||||
import com.mogo.och.unmanned.taxi.R
|
import com.mogo.och.unmanned.taxi.R
|
||||||
import com.mogo.och.unmanned.taxi.bean.PointError
|
import com.mogo.och.unmanned.taxi.bean.PointError
|
||||||
import com.mogo.och.unmanned.taxi.ui.routing.TaxiRoutingLoadingDialog
|
import com.mogo.och.unmanned.taxi.ui.routing.TaxiRoutingLoadingDialog
|
||||||
|
import kotlinx.android.synthetic.main.taxt_report_error_point_panel.view.lvs_loding
|
||||||
import kotlinx.android.synthetic.main.taxt_report_error_point_panel.view.rvErrorPointReason
|
import kotlinx.android.synthetic.main.taxt_report_error_point_panel.view.rvErrorPointReason
|
||||||
import kotlinx.android.synthetic.main.taxt_report_error_point_panel.view.tv_report_error_point_reason
|
import kotlinx.android.synthetic.main.taxt_report_error_point_panel.view.tv_report_error_point_reason
|
||||||
import kotlinx.android.synthetic.main.taxt_report_error_point_panel.view.tv_report_error_point_reason_cancel
|
import kotlinx.android.synthetic.main.taxt_report_error_point_panel.view.tv_report_error_point_reason_cancel
|
||||||
@@ -58,12 +61,6 @@ class ReportErrorPointView : WindowRelativeLayout,
|
|||||||
|
|
||||||
private var occurrenceTime:Long = System.currentTimeMillis()
|
private var occurrenceTime:Long = System.currentTimeMillis()
|
||||||
|
|
||||||
private val mLoadingDialog: TaxiRoutingLoadingDialog by lazy {
|
|
||||||
TaxiRoutingLoadingDialog(
|
|
||||||
context
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun initView() {
|
private fun initView() {
|
||||||
d(SceneConstant.M_TAXI_P + TAG, "initView")
|
d(SceneConstant.M_TAXI_P + TAG, "initView")
|
||||||
LayoutInflater.from(context).inflate(R.layout.taxt_report_error_point_panel, this, true)
|
LayoutInflater.from(context).inflate(R.layout.taxt_report_error_point_panel, this, true)
|
||||||
@@ -73,7 +70,7 @@ class ReportErrorPointView : WindowRelativeLayout,
|
|||||||
flexboxLayoutManager.alignItems = AlignItems.CENTER
|
flexboxLayoutManager.alignItems = AlignItems.CENTER
|
||||||
flexboxLayoutManager.flexWrap = FlexWrap.WRAP
|
flexboxLayoutManager.flexWrap = FlexWrap.WRAP
|
||||||
|
|
||||||
rvErrorPointReason?.layoutManager = flexboxLayoutManager
|
rvErrorPointReason?.layoutManager = GridLayoutManager(context, 2)
|
||||||
rvErrorPointReason?.setHasFixedSize(true)
|
rvErrorPointReason?.setHasFixedSize(true)
|
||||||
errorPointItemAdapter = ErrorPointItemAdapter(
|
errorPointItemAdapter = ErrorPointItemAdapter(
|
||||||
context, mutableListOf(
|
context, mutableListOf(
|
||||||
@@ -91,7 +88,8 @@ class ReportErrorPointView : WindowRelativeLayout,
|
|||||||
ToastUtils.showShort("请选择问题类型")
|
ToastUtils.showShort("请选择问题类型")
|
||||||
return@onClick
|
return@onClick
|
||||||
}
|
}
|
||||||
mLoadingDialog.showLoading()
|
tv_report_error_point_reason_cancel.isEnabled = false
|
||||||
|
lvs_loding.visibility = VISIBLE
|
||||||
this.viewModel?.submitErrorPointReasons(checkDataList,occurrenceTime)
|
this.viewModel?.submitErrorPointReasons(checkDataList,occurrenceTime)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -101,9 +99,8 @@ class ReportErrorPointView : WindowRelativeLayout,
|
|||||||
d(SceneConstant.M_TAXI_P + TAG, "展示---:${isVisible}")
|
d(SceneConstant.M_TAXI_P + TAG, "展示---:${isVisible}")
|
||||||
if (isVisible) {
|
if (isVisible) {
|
||||||
occurrenceTime = System.currentTimeMillis()
|
occurrenceTime = System.currentTimeMillis()
|
||||||
tv_work_order_time.text = "时间:${TimeUtils.millis2String(occurrenceTime, TimeUtils.getHourMinSecondFormat())}"
|
tv_work_order_time.text = TimeUtils.millis2String(occurrenceTime, TimeUtils.getHourMinSecondFormat())
|
||||||
viewModel?.getPointErrorReasons()
|
viewModel?.getPointErrorReasons()
|
||||||
mLoadingDialog.showLoading()
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -130,7 +127,6 @@ class ReportErrorPointView : WindowRelativeLayout,
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun addViewData(it: MutableList<PointError>) {
|
override fun addViewData(it: MutableList<PointError>) {
|
||||||
mLoadingDialog.hideLoading()
|
|
||||||
errorPointItemAdapter.setDataList(it)
|
errorPointItemAdapter.setDataList(it)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,12 +134,23 @@ class ReportErrorPointView : WindowRelativeLayout,
|
|||||||
msg?.let {
|
msg?.let {
|
||||||
ToastUtils.showLong(msg)
|
ToastUtils.showLong(msg)
|
||||||
}
|
}
|
||||||
mLoadingDialog.hideLoading()
|
lvs_loding.visibility = GONE
|
||||||
|
CommonFeedbackDialog
|
||||||
|
.Builder()
|
||||||
|
.title("请重试")
|
||||||
|
.status(CommonFeedbackDialog.Status.success)
|
||||||
|
.build(context).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun submitErrorReasons() {
|
override fun submitErrorReasons() {
|
||||||
mLoadingDialog.hideLoading()
|
tv_report_error_point_reason_cancel.isEnabled = true
|
||||||
this.closeCallback?.close()
|
lvs_loding.visibility = GONE
|
||||||
|
closeCallback?.close()
|
||||||
|
CommonFeedbackDialog
|
||||||
|
.Builder()
|
||||||
|
.title("打点成功")
|
||||||
|
.status(CommonFeedbackDialog.Status.success)
|
||||||
|
.build(context).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setDismiss(listener: CloseCallback) {
|
fun setDismiss(listener: CloseCallback) {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import com.mogo.och.unmanned.taxi.ui.routing.RoutingSwitchModel
|
|||||||
import com.mogo.och.unmanned.taxi.ui.routing.TaxiRoutingFeedbackDialog
|
import com.mogo.och.unmanned.taxi.ui.routing.TaxiRoutingFeedbackDialog
|
||||||
import com.mogo.och.unmanned.taxi.ui.routing.TaxiRoutingModel
|
import com.mogo.och.unmanned.taxi.ui.routing.TaxiRoutingModel
|
||||||
import com.mogo.och.common.module.map.MapMakerManager
|
import com.mogo.och.common.module.map.MapMakerManager
|
||||||
|
import com.mogo.och.common.module.wigets.dialog.CommonDialogStatus
|
||||||
import com.mogo.och.unmanned.taxi.utils.TaskUtils
|
import com.mogo.och.unmanned.taxi.utils.TaskUtils
|
||||||
import kotlinx.android.synthetic.main.unmanned_routing_running.view.actv_current_itinerary_end_name
|
import kotlinx.android.synthetic.main.unmanned_routing_running.view.actv_current_itinerary_end_name
|
||||||
import kotlinx.android.synthetic.main.unmanned_routing_running.view.actv_current_itinerary_start_name
|
import kotlinx.android.synthetic.main.unmanned_routing_running.view.actv_current_itinerary_start_name
|
||||||
@@ -91,16 +92,16 @@ class RoutingRunningView: ConstraintLayout, RoutingRunningModel.RoutingRuningCal
|
|||||||
|
|
||||||
private fun showFeedbackDialog(grayId: Long) {
|
private fun showFeedbackDialog(grayId: Long) {
|
||||||
val occurrenceTime = System.currentTimeMillis()
|
val occurrenceTime = System.currentTimeMillis()
|
||||||
val builder: TaxiRoutingFeedbackDialog.Builder = TaxiRoutingFeedbackDialog.Builder()
|
CommonDialogStatus
|
||||||
builder.cancelStr(
|
.Builder()
|
||||||
MainMoGoApplication.getApp()
|
.title("路线验证结束")
|
||||||
.getString(R.string.routing_feedback_result_btn_not_sure)
|
.tips("请点击按钮反馈验证结果")
|
||||||
).confirmStr(
|
.showClose(true)
|
||||||
MainMoGoApplication.getApp()
|
.cancelTextColor(R.color.taxi_color_FF4E41)
|
||||||
.getString(R.string.routing_feedback_result_btn_sure)
|
.cancelStr("线路可用")
|
||||||
).tips(MainMoGoApplication.getApp().getString(R.string.routing_feedback_result_hint))
|
.confirmStr("线路不可用")
|
||||||
.clickListener(object :
|
.status(CommonDialogStatus.Status.success)
|
||||||
TaxiRoutingFeedbackDialog.TaxiRoutingFeedBackDialogClickListener {
|
.clickListener(object :CommonDialogStatus.ClickListener{
|
||||||
override fun confirm() {
|
override fun confirm() {
|
||||||
swtichViewModel?.showLoading()
|
swtichViewModel?.showLoading()
|
||||||
viewModel?.endGrayTask( grayId,
|
viewModel?.endGrayTask( grayId,
|
||||||
@@ -115,8 +116,36 @@ class RoutingRunningView: ConstraintLayout, RoutingRunningModel.RoutingRuningCal
|
|||||||
occurrenceTime)
|
occurrenceTime)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
mFeedbackDialog = builder.build(context)
|
.build(context).show()
|
||||||
mFeedbackDialog?.showDialog()
|
|
||||||
|
|
||||||
|
|
||||||
|
// val builder: TaxiRoutingFeedbackDialog.Builder = TaxiRoutingFeedbackDialog.Builder()
|
||||||
|
// builder.cancelStr(
|
||||||
|
// MainMoGoApplication.getApp()
|
||||||
|
// .getString(R.string.routing_feedback_result_btn_not_sure)
|
||||||
|
// ).confirmStr(
|
||||||
|
// MainMoGoApplication.getApp()
|
||||||
|
// .getString(R.string.routing_feedback_result_btn_sure)
|
||||||
|
// ).tips(MainMoGoApplication.getApp().getString(R.string.routing_feedback_result_hint))
|
||||||
|
// .clickListener(object :
|
||||||
|
// TaxiRoutingFeedbackDialog.TaxiRoutingFeedBackDialogClickListener {
|
||||||
|
// override fun confirm() {
|
||||||
|
// swtichViewModel?.showLoading()
|
||||||
|
// viewModel?.endGrayTask( grayId,
|
||||||
|
// EndGrayTaskFeedbackType.USABLE_YES,
|
||||||
|
// occurrenceTime)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// override fun cancel() {
|
||||||
|
// swtichViewModel?.showLoading()
|
||||||
|
// viewModel?.endGrayTask( grayId,
|
||||||
|
// EndGrayTaskFeedbackType.USABLE_NO,
|
||||||
|
// occurrenceTime)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// mFeedbackDialog = builder.build(context)
|
||||||
|
// mFeedbackDialog?.showDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import androidx.recyclerview.widget.DiffUtil.Callback
|
|||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.mogo.och.unmanned.taxi.R
|
import com.mogo.och.unmanned.taxi.R
|
||||||
import com.mogo.och.unmanned.taxi.bean.GrayLineBean
|
import com.mogo.och.unmanned.taxi.bean.GrayLineBean
|
||||||
|
import me.jessyan.autosize.AutoSizeCompat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 路线列表adapter
|
* 路线列表adapter
|
||||||
@@ -49,6 +50,7 @@ class RoutingItemAdapter(
|
|||||||
override fun onBindViewHolder(holder: RoutingItemViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: RoutingItemViewHolder, position: Int) {
|
||||||
val currentPosition = holder.bindingAdapterPosition
|
val currentPosition = holder.bindingAdapterPosition
|
||||||
val routing = mData[currentPosition]
|
val routing = mData[currentPosition]
|
||||||
|
AutoSizeCompat.autoConvertDensityOfGlobal(holder.itemView.resources)
|
||||||
|
|
||||||
holder.routingName.text = routing.lineName
|
holder.routingName.text = routing.lineName
|
||||||
holder.todayVerifyNum.text = "今日验证:${routing.carVerificationCount}次"
|
holder.todayVerifyNum.text = "今日验证:${routing.carVerificationCount}次"
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
@@ -1,19 +1,31 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
<CheckBox
|
tools:background="@color/result_points"
|
||||||
android:id="@+id/cb_error_info"
|
android:layout_height="@dimen/dp_90">
|
||||||
android:button="@null"
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:text="原因"
|
android:id="@+id/aciv_show_check_status"
|
||||||
android:layout_margin="@dimen/dp_10"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:paddingStart="@dimen/dp_40"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:paddingEnd="@dimen/dp_40"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:paddingTop="@dimen/dp_14"
|
android:src="@drawable/taxi_routing_uncheck"
|
||||||
android:paddingBottom="@dimen/dp_14"
|
android:layout_width="@dimen/dp_53"
|
||||||
|
android:layout_height="@dimen/dp_53"/>
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/actv_error_resong"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/aciv_show_check_status"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/aciv_show_check_status"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/aciv_show_check_status"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:lineSpacingMultiplier="0.7"
|
||||||
|
android:layout_marginStart="@dimen/dp_30"
|
||||||
|
tools:text="绕路绕路绕路绕路绕绕路绕路绕路绕路绕绕路绕路绕路绕路绕绕路绕路绕路绕路绕绕路绕路绕路绕路绕绕路绕路绕路绕路绕"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:background="@drawable/taxi_error_point_reason_bg"
|
android:textSize="@dimen/dp_36"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
</FrameLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -1,105 +1,92 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<com.mogo.och.common.module.wigets.OCHRoundConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="@dimen/dp_844"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="@dimen/dp_900"
|
||||||
android:background="@drawable/taxi_error_point_report_bg">
|
android:layout_height="@dimen/dp_730"
|
||||||
|
android:background="@drawable/common_qr_dialog"
|
||||||
<View
|
app:roundLayoutRadius="@dimen/dp_50">
|
||||||
android:id="@+id/view_title_bg"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="@dimen/dp_102"
|
|
||||||
android:background="@drawable/taxi_error_point_head_bg"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_report_title"
|
android:id="@+id/tv_report_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_33"
|
android:layout_marginStart="@dimen/dp_33"
|
||||||
android:text="问题上报"
|
android:text="线路问题打点"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_34"
|
android:textSize="@dimen/sp_45"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/view_title_bg"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@id/view_title_bg"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@+id/view_title_bg" />
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:layout_marginTop="@dimen/dp_51"
|
||||||
|
/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_work_order_time"
|
android:id="@+id/tv_work_order_time"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/dp_31"
|
android:layout_marginEnd="@dimen/dp_67"
|
||||||
android:text="时间"
|
android:text="时间"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_30"
|
android:textSize="@dimen/sp_30"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/view_title_bg"
|
app:layout_constraintTop_toTopOf="@+id/tv_report_title"
|
||||||
app:layout_constraintEnd_toEndOf="@id/view_title_bg"
|
app:layout_constraintBottom_toBottomOf="@+id/tv_report_title"
|
||||||
app:layout_constraintTop_toTopOf="@id/view_title_bg" />
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
/>
|
||||||
<View
|
|
||||||
android:id="@+id/view_type_label"
|
|
||||||
android:layout_width="@dimen/dp_6"
|
|
||||||
android:layout_height="@dimen/dp_29"
|
|
||||||
android:layout_marginStart="@dimen/dp_33"
|
|
||||||
android:layout_marginTop="@dimen/dp_40"
|
|
||||||
android:background="#FF0176FF"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/view_title_bg" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_type_title"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_13"
|
|
||||||
android:text="问题类型"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="@dimen/sp_32"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/view_type_label"
|
|
||||||
app:layout_constraintLeft_toRightOf="@id/view_type_label"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/view_type_label" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rvErrorPointReason"
|
android:id="@+id/rvErrorPointReason"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp_0"
|
||||||
android:layout_marginStart="@dimen/dp_23"
|
android:layout_marginStart="@dimen/dp_65"
|
||||||
android:layout_marginTop="@dimen/dp_6"
|
android:layout_marginTop="@dimen/dp_56"
|
||||||
android:layout_marginEnd="@dimen/dp_23"
|
android:layout_marginEnd="@dimen/dp_65"
|
||||||
app:layout_constraintHeight_min="@dimen/dp_140"
|
android:layout_marginBottom="@dimen/dp_10"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_type_title" />
|
app:layout_constraintBottom_toTopOf="@+id/tv_report_error_point_reason"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tv_report_title" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_report_error_point_reason"
|
android:id="@+id/tv_report_error_point_reason"
|
||||||
android:layout_width="@dimen/dp_370"
|
android:layout_width="@dimen/dp_356"
|
||||||
android:layout_height="@dimen/dp_80"
|
android:layout_height="@dimen/dp_120"
|
||||||
android:layout_marginTop="@dimen/dp_30"
|
android:background="@drawable/common_button_cancle"
|
||||||
android:layout_marginBottom="@dimen/dp_40"
|
|
||||||
android:background="@drawable/taxi_error_point_report_submit_bg"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="上报"
|
android:text="打点"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="@color/taxi_color_2eacff"
|
||||||
android:textSize="@dimen/sp_27"
|
android:textSize="@dimen/sp_40"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
android:layout_marginBottom="@dimen/dp_65"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintRight_toLeftOf="@id/tv_report_error_point_reason_cancel"
|
android:layout_marginStart="@dimen/dp_65"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/rvErrorPointReason" />
|
/>
|
||||||
|
|
||||||
|
<com.mogo.och.common.module.wigets.loading.LoadingViewSmall
|
||||||
|
android:id="@+id/lvs_loding"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/tv_report_error_point_reason"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/tv_report_error_point_reason"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/tv_report_error_point_reason"
|
||||||
|
android:layout_marginEnd="@dimen/dp_30"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_report_error_point_reason_cancel"
|
android:id="@+id/tv_report_error_point_reason_cancel"
|
||||||
android:layout_width="@dimen/dp_370"
|
android:layout_width="@dimen/dp_356"
|
||||||
android:layout_height="@dimen/dp_80"
|
android:layout_height="@dimen/dp_120"
|
||||||
android:layout_marginBottom="@dimen/dp_40"
|
android:layout_marginBottom="@dimen/dp_65"
|
||||||
android:background="@drawable/taxi_error_point_report_cancle_bg"
|
android:background="@drawable/common_button_cancle"
|
||||||
|
android:layout_marginEnd="@dimen/dp_66"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="取消"
|
android:text="取消"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="@dimen/sp_27"
|
android:textSize="@dimen/sp_40"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintLeft_toRightOf="@id/tv_report_error_point_reason"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent" />
|
/>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</com.mogo.och.common.module.wigets.OCHRoundConstraintLayout>
|
||||||
@@ -161,6 +161,10 @@ android {
|
|||||||
|
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
exclude 'META-INF/io.netty.versions.properties'
|
exclude 'META-INF/io.netty.versions.properties'
|
||||||
|
doNotStrip '*/armeabi-v7a/*.so'
|
||||||
|
doNotStrip '*/armeabi/*.so'
|
||||||
|
doNotStrip '*/x86_64/*.so'
|
||||||
|
doNotStrip '*/x86/*.so'
|
||||||
}
|
}
|
||||||
|
|
||||||
useLibrary 'android.test.runner'
|
useLibrary 'android.test.runner'
|
||||||
@@ -201,8 +205,7 @@ dependencies {
|
|||||||
compileOnly rootProject.ext.dependencies.serialport
|
compileOnly rootProject.ext.dependencies.serialport
|
||||||
}
|
}
|
||||||
|
|
||||||
// implementation rootProject.ext.dependencies.mogocustommap
|
implementation rootProject.ext.dependencies.mogocustommap
|
||||||
implementation project(':libraries:mapmodule')
|
|
||||||
|
|
||||||
implementation project(':core:function-impl:mogo-core-function-startup')
|
implementation project(':core:function-impl:mogo-core-function-startup')
|
||||||
implementation project(':core:function-impl:mogo-core-function-devatools')
|
implementation project(':core:function-impl:mogo-core-function-devatools')
|
||||||
|
|||||||
@@ -6,60 +6,70 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "1"
|
"title": "1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "2"
|
"title": "2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357557335/3.mp4",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357557335/3.mp4",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "3"
|
"title": "3"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "4"
|
"title": "4"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||||
|
"priority": 2,
|
||||||
"title": "5"
|
"title": "5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676358660379/6.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676358660379/6.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||||
|
"priority": 2,
|
||||||
"title": "6"
|
"title": "6"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360154589/7.jpg",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360154589/7.jpg",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "7"
|
"title": "7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360185500/8.jpg",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360185500/8.jpg",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "8"
|
"title": "8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "9"
|
"title": "9"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360274126/10.mp4",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360274126/10.mp4",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "10"
|
"title": "10"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -70,12 +80,14 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "1"
|
"title": "1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "2"
|
"title": "2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -86,24 +98,28 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联牵手成都大运会"
|
"title": "蘑菇车联牵手成都大运会"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联覆盖生活的方方面面"
|
"title": "蘑菇车联覆盖生活的方方面面"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联之红旗车队"
|
"title": "蘑菇车联之红旗车队"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "多视角体验蘑菇车联自动驾驶"
|
"title": "多视角体验蘑菇车联自动驾驶"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -114,24 +130,28 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联牵手成都大运会"
|
"title": "蘑菇车联牵手成都大运会"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联覆盖生活的方方面面"
|
"title": "蘑菇车联覆盖生活的方方面面"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联之红旗车队"
|
"title": "蘑菇车联之红旗车队"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "多视角体验蘑菇车联自动驾驶"
|
"title": "多视角体验蘑菇车联自动驾驶"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -150,24 +170,28 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "1"
|
"title": "1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "2"
|
"title": "2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357557335/3.mp4",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357557335/3.mp4",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "3"
|
"title": "3"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "4"
|
"title": "4"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -180,36 +204,42 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||||
|
"priority": 2,
|
||||||
"title": "5"
|
"title": "5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676358660379/6.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676358660379/6.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||||
|
"priority": 2,
|
||||||
"title": "6"
|
"title": "6"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360154589/7.jpg",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360154589/7.jpg",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "7"
|
"title": "7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360185500/8.jpg",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360185500/8.jpg",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "8"
|
"title": "8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "9"
|
"title": "9"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360274126/10.mp4",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360274126/10.mp4",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "10"
|
"title": "10"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -220,12 +250,14 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "1"
|
"title": "1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "2"
|
"title": "2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -236,24 +268,28 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联牵手成都大运会"
|
"title": "蘑菇车联牵手成都大运会"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联覆盖生活的方方面面"
|
"title": "蘑菇车联覆盖生活的方方面面"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联之红旗车队"
|
"title": "蘑菇车联之红旗车队"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "多视角体验蘑菇车联自动驾驶"
|
"title": "多视角体验蘑菇车联自动驾驶"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -264,24 +300,28 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联牵手成都大运会"
|
"title": "蘑菇车联牵手成都大运会"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联覆盖生活的方方面面"
|
"title": "蘑菇车联覆盖生活的方方面面"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联之红旗车队"
|
"title": "蘑菇车联之红旗车队"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "多视角体验蘑菇车联自动驾驶"
|
"title": "多视角体验蘑菇车联自动驾驶"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -294,12 +334,14 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681210971943/yangmadou.mp4",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681210971943/yangmadou.mp4",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1680774790614/yangmadao_photo.jpg",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1680774790614/yangmadao_photo.jpg",
|
||||||
|
"priority": 2,
|
||||||
"title": "1"
|
"title": "1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681210971943/yangmadou.mp4",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681210971943/yangmadou.mp4",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1680774790614/yangmadao_photo.jpg",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1680774790614/yangmadao_photo.jpg",
|
||||||
|
"priority": 2,
|
||||||
"title": "2"
|
"title": "2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -310,12 +352,14 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "1"
|
"title": "1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "2"
|
"title": "2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -326,24 +370,28 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联牵手成都大运会"
|
"title": "蘑菇车联牵手成都大运会"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联覆盖生活的方方面面"
|
"title": "蘑菇车联覆盖生活的方方面面"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联之红旗车队"
|
"title": "蘑菇车联之红旗车队"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "多视角体验蘑菇车联自动驾驶"
|
"title": "多视角体验蘑菇车联自动驾驶"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -354,24 +402,28 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联牵手成都大运会"
|
"title": "蘑菇车联牵手成都大运会"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联覆盖生活的方方面面"
|
"title": "蘑菇车联覆盖生活的方方面面"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联之红旗车队"
|
"title": "蘑菇车联之红旗车队"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "多视角体验蘑菇车联自动驾驶"
|
"title": "多视角体验蘑菇车联自动驾驶"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -384,10 +436,12 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "1"
|
"title": "1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||||
|
"priority": 2,
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
"title": "2"
|
"title": "2"
|
||||||
@@ -396,48 +450,56 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357557335/3.mp4",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357557335/3.mp4",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "3"
|
"title": "3"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "4"
|
"title": "4"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||||
|
"priority": 2,
|
||||||
"title": "5"
|
"title": "5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676358660379/6.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676358660379/6.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||||
|
"priority": 2,
|
||||||
"title": "6"
|
"title": "6"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360154589/7.jpg",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360154589/7.jpg",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "7"
|
"title": "7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360185500/8.jpg",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360185500/8.jpg",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "8"
|
"title": "8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||||
"fileType": 1,
|
"fileType": 1,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "9"
|
"title": "9"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360274126/10.mp4",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360274126/10.mp4",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "10"
|
"title": "10"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -448,12 +510,14 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "1"
|
"title": "1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "",
|
"coverImageUrl": "",
|
||||||
|
"priority": 2,
|
||||||
"title": "2"
|
"title": "2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -464,24 +528,28 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联牵手成都大运会"
|
"title": "蘑菇车联牵手成都大运会"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联覆盖生活的方方面面"
|
"title": "蘑菇车联覆盖生活的方方面面"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联之红旗车队"
|
"title": "蘑菇车联之红旗车队"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "多视角体验蘑菇车联自动驾驶"
|
"title": "多视角体验蘑菇车联自动驾驶"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -492,24 +560,28 @@
|
|||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联牵手成都大运会"
|
"title": "蘑菇车联牵手成都大运会"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联覆盖生活的方方面面"
|
"title": "蘑菇车联覆盖生活的方方面面"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "蘑菇车联之红旗车队"
|
"title": "蘑菇车联之红旗车队"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
|
||||||
"fileType": 2,
|
"fileType": 2,
|
||||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
|
||||||
|
"priority": 2,
|
||||||
"title": "多视角体验蘑菇车联自动驾驶"
|
"title": "多视角体验蘑菇车联自动驾驶"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,28 +1,35 @@
|
|||||||
package com.mogo.launcher.startup
|
package com.mogo.launcher.startup
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import com.autonavi.nge.hdmap.HDMapProvider
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
import com.mogo.commons.debug.DebugConfig
|
import com.mogo.commons.debug.DebugConfig
|
||||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||||
import com.mogo.eagle.core.data.app.UrlConfig
|
import com.mogo.eagle.core.data.app.UrlConfig
|
||||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
|
||||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||||
import com.mogo.eagle.core.data.config.JunkConfig
|
import com.mogo.eagle.core.data.config.JunkConfig
|
||||||
|
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||||
|
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||||
import com.mogo.eagle.core.utilcode.util.ProcessUtils
|
import com.mogo.eagle.core.utilcode.util.ProcessUtils
|
||||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||||
import com.mogo.launcher.BuildConfig
|
import com.mogo.launcher.BuildConfig
|
||||||
import com.mogo.launcher.R
|
|
||||||
import com.shuyu.gsyvideoplayer.player.IjkPlayerManager
|
import com.shuyu.gsyvideoplayer.player.IjkPlayerManager
|
||||||
import com.zhidaoauto.map.sdk.open.MapAutoApi
|
import com.zhidaoauto.map.sdk.open.MapAutoApi
|
||||||
import com.zhidaoauto.map.sdk.open.MapParams
|
import com.zhidaoauto.map.sdk.open.MapParams
|
||||||
import com.zhjt.mogo_core_function_devatools.env.EnvChangeManager
|
import com.zhjt.mogo_core_function_devatools.env.EnvChangeManager
|
||||||
|
import com.zhjt.service.chain.ChainLog
|
||||||
import tv.danmaku.ijk.media.player.IjkMediaPlayer
|
import tv.danmaku.ijk.media.player.IjkMediaPlayer
|
||||||
|
import java.util.concurrent.atomic.AtomicReference
|
||||||
|
|
||||||
object ConfigStartUp {
|
object ConfigStartUp {
|
||||||
|
|
||||||
|
private const val TAG = "ConfigStartUp"
|
||||||
|
|
||||||
|
private val redisCallback by lazy { AtomicReference<HDMapProvider.IRedisLoadCallback>()}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun init(context: Context) {
|
fun init(context: Context) {
|
||||||
initDebugConfig()
|
initDebugConfig()
|
||||||
@@ -112,12 +119,78 @@ object ConfigStartUp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val mapParams = MapParams.init()
|
val mapParams = MapParams.init()
|
||||||
mapParams.setDebugMode(false)
|
mapParams.setDebugMode(true)
|
||||||
// 1-使用本地地图数据,0-使用在线地图数据
|
// 1-使用本地地图数据,0-使用在线地图数据
|
||||||
// .setDataFileSource(1)
|
// .setDataFileSource(1)
|
||||||
.setIsRecordLogs(false)
|
.setIsRecordLogs(false)
|
||||||
.setCoordinateType(MapParams.COORDINATETYPE_GCJ02)
|
.setCoordinateType(MapParams.COORDINATETYPE_GCJ02)
|
||||||
MapAutoApi.init(context, mapParams)
|
MapAutoApi.init(context, mapParams)
|
||||||
|
HDMapProvider.setRedisDataLoadCallback(object : HDMapProvider.IRedisLoadCallback {
|
||||||
|
|
||||||
|
override fun onLoginStart(ip: String, port: Int, password: String, dbIndex: Int) {
|
||||||
|
Logger.d(TAG, "-- onLoginStart --: ip: $ip, port: $port, password: $password, dbIndex: $dbIndex")
|
||||||
|
onRedisDataLoadRoute(mapOf("onLoginStart" to "ip:$ip, port:$port, password: $password, dbIndex: $dbIndex"))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun onLoginSuccess() {
|
||||||
|
Logger.d(TAG, "-- onLoginSuccess --")
|
||||||
|
onRedisDataLoadRoute(mapOf("onLoginSuccess" to ""))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onLoginFailed(error: String?) {
|
||||||
|
Logger.d(TAG, "-- onLoginFailed($error) --")
|
||||||
|
onRedisDataLoadRoute(mapOf("onLoginFailed" to "fail_reason:$error"))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onReLogin(isCanRetry: Boolean) {
|
||||||
|
Logger.d(TAG, "-- onReLogin($isCanRetry) --")
|
||||||
|
onRedisDataLoadRoute(mapOf("onReLogin" to "isCanRetry:$isCanRetry"))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onTileLoadStart(layerId: String, tileId: String) {
|
||||||
|
Logger.d(TAG, "-- onTileLoadStart(layerId: $layerId, tileId: $tileId) --")
|
||||||
|
onRedisDataLoadRoute(mapOf("onTileLoadStart" to "layerId: $layerId, tileId: $tileId"))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onTileLoadFail(layerId: String, tileId: String, error: String) {
|
||||||
|
Logger.d(TAG, "-- onTileLoadFail(layerId: $layerId, tileId: $tileId, error: $error) --")
|
||||||
|
onRedisDataLoadRoute(mapOf("onTileLoadFail" to "layerId: $layerId, tileId: $tileId, error: $error"))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onTileLoadSuccess(layerId: String, tileId: String) {
|
||||||
|
Logger.d(TAG, "-- onTileLoadSuccess(layerId: $layerId, tileId: $tileId) --")
|
||||||
|
onRedisDataLoadRoute(mapOf("onTileLoadSuccess" to "layerId: $layerId, tileId: $tileId"))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onTilesLoadStart(layerId: String, tileIds: List<String>) {
|
||||||
|
Logger.d(TAG, "-- onTilesLoadStart(layerId: $layerId, tileIds: ${tileIds.joinToString(",")}) --")
|
||||||
|
onRedisDataLoadRoute(mapOf("onTilesLoadStart" to "layerId: $layerId, tileIds: ${tileIds.joinToString(",")}"))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onTilesLoadFail(layerId: String, tileIds: List<String>, error: String?) {
|
||||||
|
Logger.d(TAG, "-- onTilesLoadFail(layerId: $layerId, tileIds: ${tileIds.joinToString(",")}, error: $error) --")
|
||||||
|
onRedisDataLoadRoute(mapOf("onTilesLoadFail" to "layerId: $layerId, tileIds: ${tileIds.joinToString(",")}, error:$error"))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun onTilesLoadSuccess(layerId: String, tileIds: List<String>) {
|
||||||
|
Logger.d(TAG, "-- onTilesLoadSuccess(layerId: $layerId, tileIds: ${tileIds.joinToString(",")}) --")
|
||||||
|
onRedisDataLoadRoute(mapOf("onTilesLoadSuccess" to "layerId: $layerId, tileIds: ${tileIds.joinToString(",")}"))
|
||||||
|
}
|
||||||
|
}.also {
|
||||||
|
redisCallback.set(it) // 将此回调保存起来,只为了在native层的引用不回收,因为native层的引用是全局弱引用
|
||||||
|
})
|
||||||
|
|
||||||
|
// HDMapProvider.toggleSystrace(true) // 开启systrace, 此功能默认关闭,只要在开发阶段定位渲染问题时才打开。(前提需要在地图sdk在关键节点进行手动打点后,再开启,之后使用systrace工具进行抓取trace文件进行分析)
|
||||||
|
// HDMapProvider.toggleMapDataDebugInfo(true) // 打开地图调试信息的文字展示,此功能也默认关闭,只有在地图测试工具中使用
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ChainLog(
|
||||||
|
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||||
|
linkCode = ChainConstant.CHAIN_SOURCE_CLOUD,
|
||||||
|
nodeAliasCode = ChainConstant.CHAIN_CODE_REDIS_DATA_LOAD,
|
||||||
|
paramIndexes = [0]
|
||||||
|
)
|
||||||
|
private fun onRedisDataLoadRoute(extra: Map<String, Any>) {}
|
||||||
}
|
}
|
||||||
22
build.gradle
22
build.gradle
@@ -153,6 +153,26 @@ subprojects.each {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
subprojects.each {
|
||||||
|
it.afterEvaluate { itx ->
|
||||||
|
if (itx.plugins.hasPlugin('com.android.library') || itx.plugins.hasPlugin('com.android.application')) {
|
||||||
|
def android = itx.extensions.findByName("android")
|
||||||
|
android.buildTypes {
|
||||||
|
configureEach { buildType ->
|
||||||
|
def matchingFallbacks = buildType.matchingFallbacks ?: []
|
||||||
|
def array = isReleaseBuild() ? ['release', 'debug'] : ['debug', 'release']
|
||||||
|
array.each { fallback ->
|
||||||
|
if (!matchingFallbacks.contains(fallback)) {
|
||||||
|
matchingFallbacks += fallback
|
||||||
|
}
|
||||||
|
}
|
||||||
|
buildType.matchingFallbacks = matchingFallbacks
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean isAndroidTestBuild() {
|
boolean isAndroidTestBuild() {
|
||||||
for (String s : gradle.startParameter.taskNames) {
|
for (String s : gradle.startParameter.taskNames) {
|
||||||
if (s.contains("AndroidTest")) {
|
if (s.contains("AndroidTest")) {
|
||||||
@@ -172,5 +192,5 @@ boolean isReleaseBuild() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean isJunkDetectEnable() {
|
boolean isJunkDetectEnable() {
|
||||||
return !isReleaseBuild()
|
return false
|
||||||
}
|
}
|
||||||
@@ -113,8 +113,8 @@ class AiRoadMarker {
|
|||||||
.rotate(marker.poi_angle.toFloat())
|
.rotate(marker.poi_angle.toFloat())
|
||||||
.longitude(marker.poi_lon)
|
.longitude(marker.poi_lon)
|
||||||
.latitude(marker.poi_lat)
|
.latitude(marker.poi_lat)
|
||||||
if (marker.poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType || marker.poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType) {
|
if (marker.poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType) {
|
||||||
builder.anchorColor("#D65D5AFF")
|
builder.anchorColor("#FFBF10")
|
||||||
}
|
}
|
||||||
CallerMapUIServiceManager.getOverlayManager()?.showOrUpdatePoint(builder.build())?.let { p ->
|
CallerMapUIServiceManager.getOverlayManager()?.showOrUpdatePoint(builder.build())?.let { p ->
|
||||||
if (!markerIds.contains(markerId)) {
|
if (!markerIds.contains(markerId)) {
|
||||||
|
|||||||
@@ -224,4 +224,15 @@ class OfflineMapDialog(context: Context) : BaseFloatDialog(context, TAG) {
|
|||||||
}
|
}
|
||||||
}, UiThreadHandler.MODE.QUEUE)
|
}, UiThreadHandler.MODE.QUEUE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun dismiss() {
|
||||||
|
super.dismiss()
|
||||||
|
if (isLoading) {
|
||||||
|
hmiAction(
|
||||||
|
"$M_HMI$TAG",
|
||||||
|
mapOf("dismiss-loading" to "cancel download")
|
||||||
|
)
|
||||||
|
mogoMapData.get()?.cancelDownloadCacheData()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,39 @@
|
|||||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||||
|
|
||||||
|
import android.animation.ObjectAnimator
|
||||||
|
import android.animation.ValueAnimator
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.os.Build
|
||||||
|
import android.os.CountDownTimer
|
||||||
|
import android.text.Html
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.animation.LinearInterpolator
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||||
|
import com.mogo.eagle.core.function.api.autopilot.IMoGoColdStartStateListener
|
||||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||||
|
import com.mogo.eagle.core.function.call.autopilot.CallerColdStartStateListenerManager
|
||||||
import com.mogo.eagle.core.function.hmi.R
|
import com.mogo.eagle.core.function.hmi.R
|
||||||
|
import com.mogo.eagle.core.utilcode.util.ResourceUtils
|
||||||
|
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||||
|
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||||
import com.zhjt.mogo.adas.data.AdasConstants
|
import com.zhjt.mogo.adas.data.AdasConstants
|
||||||
|
import kotlinx.android.synthetic.main.view_cold_start.view.ivColdStartStatus
|
||||||
|
import kotlinx.android.synthetic.main.view_cold_start.view.ivIpcConnectStatus
|
||||||
|
import kotlinx.android.synthetic.main.view_cold_start.view.ivSsmConnectStatus
|
||||||
|
import kotlinx.android.synthetic.main.view_cold_start.view.tvColdStartContent
|
||||||
|
import kotlinx.android.synthetic.main.view_cold_start.view.tvColdStartNodeState
|
||||||
|
import kotlinx.android.synthetic.main.view_cold_start.view.tvIpcConnectContent
|
||||||
|
import kotlinx.android.synthetic.main.view_cold_start.view.tvSsmConnectContent
|
||||||
|
import kotlinx.android.synthetic.main.view_cold_start.view.tvSystemStartupTitle
|
||||||
|
import kotlinx.android.synthetic.main.view_cold_start.view.viewColdStartDivider
|
||||||
|
import kotlinx.android.synthetic.main.view_cold_start.view.viewSsmConnectDivider
|
||||||
import system_master.SsmInfo
|
import system_master.SsmInfo
|
||||||
import system_master.SystemStatusInfo
|
import system_master.SystemStatusInfo
|
||||||
|
import java.lang.StringBuilder
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 冷启动呈现二期
|
* 冷启动呈现二期
|
||||||
@@ -19,12 +43,31 @@ class ColdStartView @JvmOverloads constructor(
|
|||||||
context: Context,
|
context: Context,
|
||||||
attrs: AttributeSet? = null,
|
attrs: AttributeSet? = null,
|
||||||
defStyleAttr: Int = 0
|
defStyleAttr: Int = 0
|
||||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoAutopilotStatusListener {
|
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoAutopilotStatusListener,
|
||||||
|
IMoGoColdStartStateListener {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val TAG = "ColdStartView"
|
const val TAG = "ColdStartView"
|
||||||
|
const val LOAD_SSM_WAITING_TIME = 60000L //SSM加载超时等待时间
|
||||||
|
const val COLD_START_WAITING_TIME = 300000L //冷启动超时等待时间
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var ipcConnectStatus = false //连接域控状态,默认是未连接
|
||||||
|
private var ssmConnectStatus = false //SSM连接状态,默认是未连接
|
||||||
|
private var coldStartStatus = false //冷启动状态,默认是未冷启动成功
|
||||||
|
|
||||||
|
private var ipcRotationAnim: ObjectAnimator?= null //域控连接状态动画
|
||||||
|
|
||||||
|
private var ssmRotationAnim: ObjectAnimator?= null //SSM连接状态动画
|
||||||
|
private var connectSSMTimer: CountDownTimer?= null //连接SSM等待倒计时
|
||||||
|
|
||||||
|
private var coldStartRotationAnim: ObjectAnimator?= null //冷启动连接状态动画
|
||||||
|
private var connectColdStartTimer: CountDownTimer?= null //连接冷启动等待倒计时
|
||||||
|
|
||||||
|
private val nodeStatusSb = StringBuilder() //冷启动关键节点启动详情
|
||||||
|
|
||||||
|
private var coldStartResultListener: ColdStartResultListener ?= null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
LayoutInflater.from(context).inflate(R.layout.view_cold_start, this, true)
|
LayoutInflater.from(context).inflate(R.layout.view_cold_start, this, true)
|
||||||
initView()
|
initView()
|
||||||
@@ -37,33 +80,101 @@ class ColdStartView @JvmOverloads constructor(
|
|||||||
override fun onAttachedToWindow() {
|
override fun onAttachedToWindow() {
|
||||||
super.onAttachedToWindow()
|
super.onAttachedToWindow()
|
||||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||||
|
CallerColdStartStateListenerManager.addListener(TAG,this)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDetachedFromWindow() {
|
override fun onDetachedFromWindow() {
|
||||||
super.onDetachedFromWindow()
|
super.onDetachedFromWindow()
|
||||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||||
|
CallerColdStartStateListenerManager.removeListener(TAG)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onAutopilotIpcConnectStatusChanged(
|
override fun onAutopilotIpcConnectStatusChanged(
|
||||||
status: AdasConstants.IpcConnectionStatus,
|
status: AdasConstants.IpcConnectionStatus,
|
||||||
reason: String?
|
reason: String?
|
||||||
){
|
){
|
||||||
if(status == AdasConstants.IpcConnectionStatus.CONNECTED){
|
ThreadUtils.runOnUiThread {
|
||||||
//域控连接成功
|
ipcConnectStatus = if(status == AdasConstants.IpcConnectionStatus.CONNECTED){
|
||||||
|
//域控连接成功
|
||||||
}else{
|
if(!ipcConnectStatus){
|
||||||
//域控连接失败
|
showIPCConnectSuccessView()
|
||||||
|
}
|
||||||
|
true
|
||||||
|
}else{
|
||||||
|
//域控连接失败
|
||||||
|
when(status){
|
||||||
|
//主动断开连接
|
||||||
|
AdasConstants.IpcConnectionStatus.DISCONNECTED ->{
|
||||||
|
showIPCConnectFailView("域控未连接或主动断开连接,建议重启车辆并上报问题")
|
||||||
|
}
|
||||||
|
//连接中
|
||||||
|
AdasConstants.IpcConnectionStatus.CONNECTING ->{
|
||||||
|
showIPCConnecting()
|
||||||
|
}
|
||||||
|
//重连中(定时器)
|
||||||
|
AdasConstants.IpcConnectionStatus.RECONNECTING_TIMER ->{
|
||||||
|
showIPCConnecting()
|
||||||
|
}
|
||||||
|
//重连中(网络监听)
|
||||||
|
AdasConstants.IpcConnectionStatus.RECONNECTING_NETWORK ->{
|
||||||
|
showIPCConnecting()
|
||||||
|
}
|
||||||
|
//连接异常(鹰眼与域控连接失败、无法连接、非正常断开等)
|
||||||
|
AdasConstants.IpcConnectionStatus.CONNECT_EXCEPTION ->{
|
||||||
|
showIPCConnectFailView("域控连接异常,建议检查WiFi连接情况及域控是否开机")
|
||||||
|
}
|
||||||
|
//非法地址(连接模式为指定地址时:表示当前鹰眼调用连接时传入的域控地址错误或不符合规则【不修改默认配置不会出现此问题】;
|
||||||
|
// 连接模式为PING模式时:表示传入的PING地址列表存在问题)
|
||||||
|
AdasConstants.IpcConnectionStatus.ILLEGAL_ADDRESS ->{
|
||||||
|
showIPCConnectFailView("非法域控地址,建议重启车辆并上报问题")
|
||||||
|
}
|
||||||
|
//正在搜索域控地址
|
||||||
|
AdasConstants.IpcConnectionStatus.SEARCH_ADDRESS ->{
|
||||||
|
showIPCConnecting()
|
||||||
|
}
|
||||||
|
//找不到可用地址(域控地址列表中的全部地址均无法连通
|
||||||
|
// 【不修改默认配置的情况下需要排查PAD是否连接车载路由器、工控机是否连接车载路由器、
|
||||||
|
// 工控机是否开机等】)
|
||||||
|
AdasConstants.IpcConnectionStatus.NOT_FOUND_ADDRESS ->{
|
||||||
|
showIPCConnectFailView("找不到域控可用地址,建议检查车载路由器及域控是否开机")
|
||||||
|
}
|
||||||
|
//域控证书认证异常
|
||||||
|
AdasConstants.IpcConnectionStatus.CERTIFICATION_FAILED ->{
|
||||||
|
showIPCConnectFailView("域控证书认证异常")
|
||||||
|
}
|
||||||
|
//心跳超时(连接域控成功后在一段时间内未收到域控任何数据),超时时间:
|
||||||
|
AdasConstants.IpcConnectionStatus.HEARTBEAT_TIMEOUT ->{
|
||||||
|
showIPCConnectFailView("心跳超时(连接域控成功后在一段时间内未收到域控任何数据)")
|
||||||
|
}
|
||||||
|
//協議不匹配(被连接的域控端非WebSocket协议【可能性非常低】)
|
||||||
|
AdasConstants.IpcConnectionStatus.PROTOCOL_MISMATCH ->{
|
||||||
|
showIPCConnectFailView("协议不匹配")
|
||||||
|
}
|
||||||
|
//域控主动断开连接(域控主动发起断开WebSocket连接
|
||||||
|
AdasConstants.IpcConnectionStatus.SERVER_DISCONNECTED ->{
|
||||||
|
showIPCConnectFailView("域控主动断开连接,建议重启车辆并上报问题")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态查询应答
|
* 状态查询应答
|
||||||
* @param status 数据
|
* @param status 数据
|
||||||
* HQ、M1 MAP350开始弃用,其他车型MAP360开始弃用
|
* HQ、M1 MAP350开始弃用,其他车型MAP360开始弃用
|
||||||
*/
|
*/
|
||||||
override fun onAutopilotStatusRespByQuery(status: SystemStatusInfo.StatusInfo) {
|
override fun onAutopilotStatusRespByQuery(status: SystemStatusInfo.StatusInfo) {
|
||||||
|
ThreadUtils.runOnUiThread {
|
||||||
|
//SSM连接成功
|
||||||
|
connectSSMSuccess()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -74,7 +185,328 @@ class ColdStartView @JvmOverloads constructor(
|
|||||||
* @param statusInf 数据
|
* @param statusInf 数据
|
||||||
*/
|
*/
|
||||||
override fun onSystemStatus(statusInf: SsmInfo.SsmStatusInf) {
|
override fun onSystemStatus(statusInf: SsmInfo.SsmStatusInf) {
|
||||||
|
ThreadUtils.runOnUiThread {
|
||||||
|
//SSM连接成功
|
||||||
|
connectSSMSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷启动状态变更上报以及查询状态
|
||||||
|
*
|
||||||
|
* @param token 唯一消息ID
|
||||||
|
* @param timestamp 消息发送时间 单位:毫秒
|
||||||
|
* @param isQuery 是否是查询 ture:查询相应的结果 false:表示状态变动域控主动推送
|
||||||
|
* @param coldStartState 数据 null表示 PadSsmMsg中的消息体为null
|
||||||
|
*/
|
||||||
|
override fun onColdStartState(
|
||||||
|
token: Long,
|
||||||
|
timestamp: Long,
|
||||||
|
isQuery: Boolean,
|
||||||
|
coldStartState: SsmInfo.ColdStartState?
|
||||||
|
) {
|
||||||
|
coldStartState?.let {
|
||||||
|
ThreadUtils.runOnUiThread {
|
||||||
|
if(it.eventStatus == SsmInfo.CSState.COLD_START_READY){
|
||||||
|
//冷启动就绪
|
||||||
|
showColdStartSuccessView()
|
||||||
|
}
|
||||||
|
tvColdStartContent.text = getColdStartEventStatus(it.eventStatus)
|
||||||
|
nodeStatusSb.clear()
|
||||||
|
it.nodeList.forEach {node->
|
||||||
|
val nodeDetail = node.nodeName+ " " + getColdStartNodeStatus(node.status)
|
||||||
|
if(node.status == SsmInfo.NodeStatus.NODE_FAILED || node.status ==SsmInfo.NodeStatus.NODE_TIMEOUT){
|
||||||
|
nodeStatusSb.append("<font color=\"#FFCD3D\">${nodeDetail}</font>")
|
||||||
|
}else{
|
||||||
|
nodeStatusSb.append("<font color=\"#B2FFFFFF\">${nodeDetail}</font>")
|
||||||
|
}
|
||||||
|
nodeStatusSb.append("<br>")
|
||||||
|
}
|
||||||
|
tvColdStartNodeState.text = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
|
Html.fromHtml(nodeStatusSb.toString(), Html.FROM_HTML_MODE_LEGACY)
|
||||||
|
} else {
|
||||||
|
Html.fromHtml(nodeStatusSb.toString())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷启动状态
|
||||||
|
*/
|
||||||
|
private fun getColdStartEventStatus(state: SsmInfo.CSState): String{
|
||||||
|
return when(state){
|
||||||
|
// 未开始
|
||||||
|
SsmInfo.CSState.COLD_START_DEFAULT->{
|
||||||
|
"启动中…"
|
||||||
|
}
|
||||||
|
// 启动中
|
||||||
|
SsmInfo.CSState.COLD_START_STARTING->{
|
||||||
|
"启动中…"
|
||||||
|
}
|
||||||
|
// 就绪
|
||||||
|
SsmInfo.CSState.COLD_START_READY->{
|
||||||
|
"系统启动成功,即将进入主页"
|
||||||
|
}
|
||||||
|
// 有异常未就绪
|
||||||
|
SsmInfo.CSState.COLD_START_UNREADY->{
|
||||||
|
"系统启动异常,建议重启车辆并上报问题"
|
||||||
|
}
|
||||||
|
// 超时
|
||||||
|
SsmInfo.CSState.COLD_START_TIMEOUT->{
|
||||||
|
"系统启动异常,建议重启车辆并上报问题"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取节点启动状态
|
||||||
|
*/
|
||||||
|
private fun getColdStartNodeStatus(nodeStatus: SsmInfo.NodeStatus): String{
|
||||||
|
return when(nodeStatus){
|
||||||
|
// 启动中
|
||||||
|
SsmInfo.NodeStatus.NODE_STARTING->{
|
||||||
|
"启动中…"
|
||||||
|
}
|
||||||
|
// 启动成功
|
||||||
|
SsmInfo.NodeStatus.NODE_FINISH->{
|
||||||
|
"启动成功"
|
||||||
|
}
|
||||||
|
// 启动失败
|
||||||
|
SsmInfo.NodeStatus.NODE_FAILED->{
|
||||||
|
"启动失败"
|
||||||
|
}
|
||||||
|
// 启动超时
|
||||||
|
SsmInfo.NodeStatus.NODE_TIMEOUT->{
|
||||||
|
"启动超时"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展示域控连接成功视图
|
||||||
|
*/
|
||||||
|
private fun showIPCConnectSuccessView(){
|
||||||
|
ipcRotationAnim?.cancel()
|
||||||
|
ivIpcConnectStatus.rotation = 0f
|
||||||
|
tvSystemStartupTitle.text = resources.getString(R.string.cold_start_in_progress_title)
|
||||||
|
ivIpcConnectStatus.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_cold_start_success))
|
||||||
|
tvIpcConnectContent.text = resources.getString(R.string.ipc_connect_success)
|
||||||
|
//开启连接SSM倒计时
|
||||||
|
connectSSMProcess()
|
||||||
|
//域控连接成功后开始展示SSM连接状态
|
||||||
|
viewSsmConnectDivider.visibility = View.VISIBLE
|
||||||
|
ivSsmConnectStatus.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_cold_start_process))
|
||||||
|
//旋转动画
|
||||||
|
ssmRotationAnim = ObjectAnimator.ofFloat(ivSsmConnectStatus, "rotation", 0f, 360f)
|
||||||
|
ssmRotationAnim?.repeatCount = ValueAnimator.INFINITE
|
||||||
|
ssmRotationAnim?.repeatMode = ValueAnimator.RESTART
|
||||||
|
ssmRotationAnim?.duration = 1500
|
||||||
|
ssmRotationAnim?.interpolator = LinearInterpolator()
|
||||||
|
ssmRotationAnim?.start()
|
||||||
|
//设置SSM连接文案为连接中
|
||||||
|
tvSsmConnectContent.text = resources.getString(R.string.ssm_connect_loading)
|
||||||
|
tvSsmConnectContent.setTextColor(ContextCompat.getColor(context, android.R.color.white))
|
||||||
|
viewSsmConnectDivider.visibility = View.VISIBLE
|
||||||
|
ivSsmConnectStatus.visibility = View.VISIBLE
|
||||||
|
tvSsmConnectContent.visibility = View.VISIBLE
|
||||||
|
//隐藏冷启动相关视图
|
||||||
|
viewColdStartDivider.visibility = View.GONE
|
||||||
|
ivColdStartStatus.visibility = View.GONE
|
||||||
|
tvColdStartContent.visibility = View.GONE
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展示域控连接失败视图
|
||||||
|
*/
|
||||||
|
private fun showIPCConnectFailView(reason: String?){
|
||||||
|
if(tvIpcConnectContent.text.isNotEmpty() && tvIpcConnectContent.text.equals(reason)){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ipcRotationAnim?.cancel()
|
||||||
|
ivIpcConnectStatus.rotation = 0f
|
||||||
|
ivIpcConnectStatus.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_cold_start_fail))
|
||||||
|
reason?.let {
|
||||||
|
tvIpcConnectContent.text = it
|
||||||
|
}
|
||||||
|
//隐藏SSM相关视图
|
||||||
|
viewSsmConnectDivider.visibility = View.GONE
|
||||||
|
ivSsmConnectStatus.visibility = View.GONE
|
||||||
|
tvSsmConnectContent.visibility = View.GONE
|
||||||
|
//隐藏冷启动相关视图
|
||||||
|
viewColdStartDivider.visibility = View.GONE
|
||||||
|
ivColdStartStatus.visibility = View.GONE
|
||||||
|
tvColdStartContent.visibility = View.GONE
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun showIPCConnecting(){
|
||||||
|
ivIpcConnectStatus.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_cold_start_process))
|
||||||
|
tvIpcConnectContent.text = "正在连接域控..."
|
||||||
|
ipcRotationAnim = ObjectAnimator.ofFloat(ivIpcConnectStatus, "rotation", 0f, 360f)
|
||||||
|
ipcRotationAnim?.repeatCount = ValueAnimator.INFINITE
|
||||||
|
ipcRotationAnim?.repeatMode = ValueAnimator.RESTART
|
||||||
|
ipcRotationAnim?.duration = 1500
|
||||||
|
ipcRotationAnim?.interpolator = LinearInterpolator()
|
||||||
|
ipcRotationAnim?.start()
|
||||||
|
//隐藏SSM相关视图
|
||||||
|
viewSsmConnectDivider.visibility = View.GONE
|
||||||
|
ivSsmConnectStatus.visibility = View.GONE
|
||||||
|
tvSsmConnectContent.visibility = View.GONE
|
||||||
|
//隐藏冷启动相关视图
|
||||||
|
viewColdStartDivider.visibility = View.GONE
|
||||||
|
ivColdStartStatus.visibility = View.GONE
|
||||||
|
tvColdStartContent.visibility = View.GONE
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SSM连接成功
|
||||||
|
*/
|
||||||
|
private fun connectSSMSuccess(){
|
||||||
|
if(!ssmConnectStatus){
|
||||||
|
showSSMConnectSuccessView()
|
||||||
|
//取消连接SSM超时等待倒计时
|
||||||
|
connectSSMTimer?.cancel()
|
||||||
|
//开始启动冷启动等待倒计时
|
||||||
|
coldStartProcess()
|
||||||
|
}
|
||||||
|
ssmConnectStatus = true
|
||||||
|
coldStartStatus = false
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展示SSM连接成功视图
|
||||||
|
*/
|
||||||
|
private fun showSSMConnectSuccessView(){
|
||||||
|
tvSystemStartupTitle.text = resources.getString(R.string.cold_start_in_progress_title)
|
||||||
|
//取消旋转动画
|
||||||
|
ssmRotationAnim?.cancel()
|
||||||
|
//取消连接SSM超时等待倒计时
|
||||||
|
connectSSMTimer?.cancel()
|
||||||
|
//展示SSM连接成功视图
|
||||||
|
ivSsmConnectStatus.rotation = 0f
|
||||||
|
ivSsmConnectStatus.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_cold_start_success))
|
||||||
|
tvSsmConnectContent.text = resources.getString(R.string.ssm_connect_success)
|
||||||
|
tvSsmConnectContent.setTextColor(ContextCompat.getColor(context, R.color.white))
|
||||||
|
//展示冷启动连接过程视图
|
||||||
|
viewColdStartDivider.visibility = View.VISIBLE
|
||||||
|
ivColdStartStatus.visibility = View.VISIBLE
|
||||||
|
tvColdStartContent.visibility = View.VISIBLE
|
||||||
|
tvColdStartContent.text = "启动中…"
|
||||||
|
ivColdStartStatus.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_cold_start_process))
|
||||||
|
//开启冷启动连接状态动画
|
||||||
|
coldStartRotationAnim = ObjectAnimator.ofFloat(ivColdStartStatus, "rotation", 0f, 360f)
|
||||||
|
coldStartRotationAnim?.repeatCount = ValueAnimator.INFINITE
|
||||||
|
coldStartRotationAnim?.repeatMode = ValueAnimator.RESTART
|
||||||
|
coldStartRotationAnim?.duration = 1500
|
||||||
|
coldStartRotationAnim?.interpolator = LinearInterpolator()
|
||||||
|
coldStartRotationAnim?.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展示SSM连接失败视图
|
||||||
|
*/
|
||||||
|
private fun showSSMConnectFailView(){
|
||||||
|
tvSystemStartupTitle.text = resources.getString(R.string.cold_start_fail_title)
|
||||||
|
//取消旋转动画
|
||||||
|
ssmRotationAnim?.cancel()
|
||||||
|
ivSsmConnectStatus.rotation = 0f
|
||||||
|
ivSsmConnectStatus.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_cold_start_fail))
|
||||||
|
tvSsmConnectContent.text = resources.getString(R.string.ssm_connect_fail)
|
||||||
|
tvSsmConnectContent.setTextColor(ContextCompat.getColor(context, R.color.cold_start_fail))
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 连接SSM过程
|
||||||
|
*/
|
||||||
|
private fun connectSSMProcess(){
|
||||||
|
ThreadUtils.runOnUiThread {
|
||||||
|
connectSSMTimer = object: CountDownTimer(LOAD_SSM_WAITING_TIME,LOAD_SSM_WAITING_TIME){
|
||||||
|
override fun onTick(millisUntilFinished: Long) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFinish() {
|
||||||
|
//将SSM连接状态置为false
|
||||||
|
ssmConnectStatus = false
|
||||||
|
coldStartStatus = false
|
||||||
|
//取消连接SSM超时等待倒计时
|
||||||
|
connectSSMTimer?.cancel()
|
||||||
|
//展示连接SSM失败视图
|
||||||
|
showSSMConnectFailView()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
connectSSMTimer?.start()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷启动过程
|
||||||
|
*/
|
||||||
|
private fun coldStartProcess(){
|
||||||
|
ThreadUtils.runOnUiThread {
|
||||||
|
connectColdStartTimer = object: CountDownTimer(COLD_START_WAITING_TIME,COLD_START_WAITING_TIME){
|
||||||
|
override fun onTick(millisUntilFinished: Long) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFinish() {
|
||||||
|
//将冷启动状态置为false
|
||||||
|
coldStartStatus = false
|
||||||
|
//展示冷启动失败视图
|
||||||
|
showColdStartFailView()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
connectColdStartTimer?.start()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷启动失败视图
|
||||||
|
*/
|
||||||
|
private fun showColdStartFailView(){
|
||||||
|
tvSystemStartupTitle.text = resources.getString(R.string.cold_start_fail_title)
|
||||||
|
coldStartRotationAnim?.cancel()
|
||||||
|
ivColdStartStatus.rotation = 0f
|
||||||
|
ivColdStartStatus.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_cold_start_fail))
|
||||||
|
tvColdStartContent.text = resources.getString(R.string.cold_start_fail_content)
|
||||||
|
coldStartResultListener?.coldStartFail()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷启动成功视图
|
||||||
|
*/
|
||||||
|
private fun showColdStartSuccessView(){
|
||||||
|
tvSystemStartupTitle.text = resources.getString(R.string.cold_start_success_title)
|
||||||
|
coldStartRotationAnim?.cancel()
|
||||||
|
ivColdStartStatus.rotation = 0f
|
||||||
|
ivColdStartStatus.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_cold_start_success))
|
||||||
|
tvColdStartContent.text = resources.getString(R.string.cold_start_success_content)
|
||||||
|
connectColdStartTimer?.cancel()
|
||||||
|
hideColdStartView()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 隐藏冷启动视图
|
||||||
|
*/
|
||||||
|
private fun hideColdStartView(){
|
||||||
|
UiThreadHandler.postDelayed({
|
||||||
|
this@ColdStartView.visibility = View.GONE
|
||||||
|
coldStartResultListener?.coldStartSuccess()
|
||||||
|
}, 2000)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷启动接管监听接口
|
||||||
|
*/
|
||||||
|
interface ColdStartResultListener{
|
||||||
|
fun coldStartSuccess()
|
||||||
|
fun coldStartFail()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setColdStartResultListener(listener: ColdStartResultListener){
|
||||||
|
coldStartResultListener = listener
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,9 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:background="#7F000000"
|
||||||
|
>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvSystemStartupTitle"
|
android:id="@+id/tvSystemStartupTitle"
|
||||||
@@ -12,6 +14,9 @@
|
|||||||
android:textSize="@dimen/sp_70"
|
android:textSize="@dimen/sp_70"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
android:text="@string/cold_start_in_progress_title"
|
||||||
|
android:layout_marginTop="@dimen/dp_432"
|
||||||
|
android:layout_marginStart="@dimen/dp_261"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -21,6 +26,7 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@id/tvSystemStartupTitle"
|
app:layout_constraintTop_toBottomOf="@id/tvSystemStartupTitle"
|
||||||
app:layout_constraintLeft_toLeftOf="@id/tvSystemStartupTitle"
|
app:layout_constraintLeft_toLeftOf="@id/tvSystemStartupTitle"
|
||||||
android:contentDescription="@string/ipc_connect_icon"
|
android:contentDescription="@string/ipc_connect_icon"
|
||||||
|
android:layout_marginTop="@dimen/dp_89"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -44,6 +50,7 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@id/ivIpcConnectStatus"
|
app:layout_constraintTop_toBottomOf="@id/ivIpcConnectStatus"
|
||||||
android:layout_marginTop="@dimen/dp_5"
|
android:layout_marginTop="@dimen/dp_5"
|
||||||
android:background="@drawable/bg_cold_start_divider"
|
android:background="@drawable/bg_cold_start_divider"
|
||||||
|
android:visibility="invisible"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -54,6 +61,7 @@
|
|||||||
app:layout_constraintLeft_toLeftOf="@id/viewSsmConnectDivider"
|
app:layout_constraintLeft_toLeftOf="@id/viewSsmConnectDivider"
|
||||||
app:layout_constraintRight_toRightOf="@id/viewSsmConnectDivider"
|
app:layout_constraintRight_toRightOf="@id/viewSsmConnectDivider"
|
||||||
android:contentDescription="@string/ssm_connect_icon"
|
android:contentDescription="@string/ssm_connect_icon"
|
||||||
|
android:layout_marginTop="@dimen/dp_5"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -77,8 +85,40 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@id/ivSsmConnectStatus"
|
app:layout_constraintTop_toBottomOf="@id/ivSsmConnectStatus"
|
||||||
android:layout_marginTop="@dimen/dp_5"
|
android:layout_marginTop="@dimen/dp_5"
|
||||||
android:background="@drawable/bg_cold_start_divider"
|
android:background="@drawable/bg_cold_start_divider"
|
||||||
|
android:visibility="invisible"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivColdStartStatus"
|
||||||
|
android:layout_width="@dimen/dp_40"
|
||||||
|
android:layout_height="@dimen/dp_40"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/viewColdStartDivider"
|
||||||
|
app:layout_constraintLeft_toLeftOf="@id/viewColdStartDivider"
|
||||||
|
app:layout_constraintRight_toRightOf="@id/viewColdStartDivider"
|
||||||
|
android:layout_marginTop="@dimen/dp_5"
|
||||||
|
android:contentDescription="@string/cold_start_icon"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvColdStartContent"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/ivColdStartStatus"
|
||||||
|
app:layout_constraintLeft_toRightOf="@id/ivColdStartStatus"
|
||||||
|
android:textSize="@dimen/sp_36"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:layout_marginStart="@dimen/dp_15"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvColdStartNodeState"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvColdStartContent"
|
||||||
|
app:layout_constraintLeft_toLeftOf="@id/tvColdStartContent"
|
||||||
|
android:textSize="@dimen/sp_32"
|
||||||
|
android:textColor="#B2FFFFFF"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -92,4 +92,6 @@
|
|||||||
|
|
||||||
<color name="auto_exploration_content_p">#131415</color>
|
<color name="auto_exploration_content_p">#131415</color>
|
||||||
|
|
||||||
|
<color name="cold_start_fail">#FFCD3D</color>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -215,5 +215,15 @@
|
|||||||
|
|
||||||
<string name="ipc_connect_icon">域控连接状态图标</string>
|
<string name="ipc_connect_icon">域控连接状态图标</string>
|
||||||
<string name="ssm_connect_icon">SSM连接状态图标</string>
|
<string name="ssm_connect_icon">SSM连接状态图标</string>
|
||||||
|
<string name="cold_start_icon">冷启动状态图标</string>
|
||||||
|
<string name="ipc_connect_success">已连接域控</string>
|
||||||
|
<string name="cold_start_in_progress_title">系统启动中…</string>
|
||||||
|
<string name="cold_start_success_title">系统启动成功</string>
|
||||||
|
<string name="cold_start_fail_title">系统启动失败</string>
|
||||||
|
<string name="ssm_connect_loading">正在连接SSM…</string>
|
||||||
|
<string name="ssm_connect_success">已连接SSM</string>
|
||||||
|
<string name="ssm_connect_fail">SSM连接异常,建议重启车辆并上报问题</string>
|
||||||
|
<string name="cold_start_success_content">系统启动成功,即将进入主页</string>
|
||||||
|
<string name="cold_start_fail_content">系统启动异常,建议重启车辆并上报问题</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<!--android:keyHeight="122dp"
|
<!--android:keyHeight="122dp"
|
||||||
android:keyWidth="237dp"-->
|
android:keyWidth="237dp"-->
|
||||||
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
|
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:keyboard="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:keyHeight="122dp"
|
android:keyHeight="122dp"
|
||||||
android:keyWidth="239dp"
|
android:keyWidth="239dp"
|
||||||
android:horizontalGap="1dp"
|
android:horizontalGap="1dp"
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<Key
|
<Key
|
||||||
android:codes="-4"
|
android:codes="-4"
|
||||||
keyboard:keyBackground="@drawable/keyboard_blue"
|
app:keyBackground="@drawable/keyboard_blue"
|
||||||
android:keyHeight="368dp"
|
android:keyHeight="368dp"
|
||||||
android:keyLabel="确定"/>
|
android:keyLabel="确定"/>
|
||||||
</Row>
|
</Row>
|
||||||
|
|||||||
@@ -61,8 +61,7 @@ dependencies {
|
|||||||
exclude group: 'com.zhidaoauto.machine', module: 'map'
|
exclude group: 'com.zhidaoauto.machine', module: 'map'
|
||||||
}
|
}
|
||||||
|
|
||||||
// implementation rootProject.ext.dependencies.mogocustommap
|
implementation rootProject.ext.dependencies.mogocustommap
|
||||||
implementation project(':libraries:mapmodule')
|
|
||||||
implementation rootProject.ext.dependencies.amapnavi3dmap
|
implementation rootProject.ext.dependencies.amapnavi3dmap
|
||||||
|
|
||||||
implementation rootProject.ext.dependencies.androidxroomruntime
|
implementation rootProject.ext.dependencies.androidxroomruntime
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ class ChainConstant {
|
|||||||
const val CHAIN_CODE_MAIN_BLOCK = "CHAIN_CODE_MAIN_BLOCK"
|
const val CHAIN_CODE_MAIN_BLOCK = "CHAIN_CODE_MAIN_BLOCK"
|
||||||
const val CHAIN_CODE_DISPATCH_RECEIVE = "CHAIN_CODE_DISPATCH_RECEIVE"
|
const val CHAIN_CODE_DISPATCH_RECEIVE = "CHAIN_CODE_DISPATCH_RECEIVE"
|
||||||
const val CHAIN_CODE_DISPATCH_START = "CHAIN_CODE_DISPATCH_START"
|
const val CHAIN_CODE_DISPATCH_START = "CHAIN_CODE_DISPATCH_START"
|
||||||
|
const val CHAIN_CODE_REDIS_DATA_LOAD = "CHAIN_CODE_REDIS_DATA_LOAD"
|
||||||
|
|
||||||
const val CHAIN_CODE_CLOUD_INIT = "CHAIN_CODE_CLOUD_INIT"
|
const val CHAIN_CODE_CLOUD_INIT = "CHAIN_CODE_CLOUD_INIT"
|
||||||
const val CHAIN_CODE_CLOUD_PASSPORT_TOKEN = "CHAIN_CODE_CLOUD_PASSPORT_TOKEN"
|
const val CHAIN_CODE_CLOUD_PASSPORT_TOKEN = "CHAIN_CODE_CLOUD_PASSPORT_TOKEN"
|
||||||
|
|||||||
@@ -832,7 +832,7 @@ enum class EventTypeEnumNew(
|
|||||||
}
|
}
|
||||||
TYPE_SOCKET_ROAD_CONGESTION.poiType -> R.raw.v2x_yongdu
|
TYPE_SOCKET_ROAD_CONGESTION.poiType -> R.raw.v2x_yongdu
|
||||||
TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType -> if (FunctionBuildConfig.skinMode != 0) TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE.traffic3DIconId else TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE.traffic3DNightIconId
|
TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType -> if (FunctionBuildConfig.skinMode != 0) TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE.traffic3DIconId else TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE.traffic3DNightIconId
|
||||||
TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType -> if (FunctionBuildConfig.skinMode != 0) TrafficTypeEnum.TYPE_TRAFFIC_ID_TA_CHE.traffic3DIconId else TrafficTypeEnum.TYPE_TRAFFIC_ID_TA_CHE.traffic3DNightIconId
|
TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType -> if (FunctionBuildConfig.skinMode != 0) TrafficTypeEnum.TYPE_TRAFFIC_ID_TA_CHE_RETROGRADE.traffic3DIconId else TrafficTypeEnum.TYPE_TRAFFIC_ID_TA_CHE_RETROGRADE.traffic3DNightIconId
|
||||||
else -> 0
|
else -> 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,8 +121,18 @@ enum class TrafficTypeEnum(
|
|||||||
R.raw.v2x_shigu_sanjiaopai,
|
R.raw.v2x_shigu_sanjiaopai,
|
||||||
R.raw.v2x_shigu_sanjiaopai,
|
R.raw.v2x_shigu_sanjiaopai,
|
||||||
R.raw.v2x_shigu_sanjiaopai
|
R.raw.v2x_shigu_sanjiaopai
|
||||||
|
),
|
||||||
|
|
||||||
|
TYPE_TRAFFIC_ID_TA_CHE_RETROGRADE(
|
||||||
|
100062,
|
||||||
|
"他车逆行",
|
||||||
|
R.raw.traffic_tachexiaoche_retrograde,
|
||||||
|
R.raw.traffic_tachexiaoche_retrograde,
|
||||||
|
R.raw.traffic_tachexiaoche_retrograde
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun getType(type: Int): TrafficTypeEnum {
|
fun getType(type: Int): TrafficTypeEnum {
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package com.mogo.eagle.core.data.och
|
||||||
|
|
||||||
|
import com.mogo.eagle.core.data.map.MogoLocation
|
||||||
|
|
||||||
|
// type 0-> 起终点坐标 坐标index 0 起点 坐标index 1 终点
|
||||||
|
data class OchInfo(var type: Int, var latLonList: List<MogoLocation>)
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.mogo.eagle.core.function.api.datacenter
|
package com.mogo.eagle.core.function.api.datacenter
|
||||||
|
|
||||||
|
import com.mogo.eagle.core.data.map.MogoLocation
|
||||||
|
import com.mogo.eagle.core.data.och.OchInfo
|
||||||
|
|
||||||
interface IDataCenterBizListener {
|
interface IDataCenterBizListener {
|
||||||
|
|
||||||
fun invokeLoginNo(loginNo:String?){}
|
fun invokeLoginNo(loginNo:String?){}
|
||||||
@@ -24,4 +27,5 @@ interface IDataCenterBizListener {
|
|||||||
|
|
||||||
fun invokeAutopilotOrderId(orderID:String){}
|
fun invokeAutopilotOrderId(orderID:String){}
|
||||||
|
|
||||||
|
fun invokeOchInfo(ochInfo: OchInfo) {}
|
||||||
}
|
}
|
||||||
@@ -30,7 +30,11 @@ object CallerAutopilotStatisticsListenerManager : CallerBase<IMoGoAutopilotStati
|
|||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
CallerTrace.write("AutopilotStatistics", mapOf("status" to it.status, "failedMessage" to (it.failedMessage?.msg?:""),
|
CallerTrace.write("AutopilotStatistics", mapOf("status" to it.status, "failedMessage" to (it.failedMessage?.msg?:""),
|
||||||
"req" to it.req, "usedTime" to it.usedTime,
|
"reqSource" to it.req.source,
|
||||||
|
"reqMode" to it.req.mode,
|
||||||
|
"reqCmdOrderId" to (it.req.cmdInfo.orderId?:""),
|
||||||
|
"reqCmdFirstFlag" to it.req.cmdInfo.firstAutopilotFlag,
|
||||||
|
"usedTime" to it.usedTime,
|
||||||
"isDemoMode" to FunctionBuildConfig.isDemoMode,
|
"isDemoMode" to FunctionBuildConfig.isDemoMode,
|
||||||
"isTakeoverRemind" to FunctionBuildConfig.isTakeoverRemind))
|
"isTakeoverRemind" to FunctionBuildConfig.isTakeoverRemind))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.mogo.eagle.core.function.call.datacenter
|
package com.mogo.eagle.core.function.call.datacenter
|
||||||
|
|
||||||
|
import com.mogo.eagle.core.data.map.MogoLocation
|
||||||
|
import com.mogo.eagle.core.data.och.OchInfo
|
||||||
import com.mogo.eagle.core.function.api.datacenter.IDataCenterBizListener
|
import com.mogo.eagle.core.function.api.datacenter.IDataCenterBizListener
|
||||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||||
import java.util.concurrent.atomic.AtomicBoolean
|
import java.util.concurrent.atomic.AtomicBoolean
|
||||||
@@ -96,6 +98,12 @@ object CallerDataCenterBizListener : CallerBase<IDataCenterBizListener>() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun invokeOchInfo(ochInfo: OchInfo) {
|
||||||
|
M_LISTENERS.forEach {
|
||||||
|
it.value.invokeOchInfo(ochInfo)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun getOrderId(): String {
|
fun getOrderId(): String {
|
||||||
return orderId
|
return orderId
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -83,7 +83,7 @@ MOGO_TELEMATIC_VERSION=1.4.7.42
|
|||||||
MOGO_SKIN_VERSION=1.4.7.48
|
MOGO_SKIN_VERSION=1.4.7.48
|
||||||
######## MogoAiCloudSDK Version ########
|
######## MogoAiCloudSDK Version ########
|
||||||
# 自研地图
|
# 自研地图
|
||||||
MAP_SDK_VERSION=3.4.1.2
|
MAP_SDK_VERSION=3.4.1.13_alpha_7
|
||||||
MAP_SDK_DATA_VERSION=1.0.0.9
|
MAP_SDK_DATA_VERSION=1.0.0.9
|
||||||
MAP_SDK_OPERATION_VERSION=1.1.4.1
|
MAP_SDK_OPERATION_VERSION=1.1.4.1
|
||||||
# websocket
|
# websocket
|
||||||
|
|||||||
@@ -111,10 +111,10 @@ void setLeadLine(){
|
|||||||
}
|
}
|
||||||
void setSignalLine(){
|
void setSignalLine(){
|
||||||
if(signalLineObj==1 && signalLineStep>0){
|
if(signalLineObj==1 && signalLineStep>0){
|
||||||
_uv.x = (uv.x - 0.5)*signalScale + 0.5; //x方向缩放
|
_uv.x = uv.x;
|
||||||
_uv.y = uv.y;
|
_uv.y = uv.y;
|
||||||
signalLineTexY = _uv.y;
|
signalLineTexY = _uv.y;
|
||||||
_uv = _uv + vec2(0.0,1.0)*signalLineTime;
|
_uv = _uv + vec2(0.0,1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void setGuideLine(){
|
void setGuideLine(){
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.autonavi.nge.dm;//package com.autonavi.nge.dm;
|
//package com.autonavi.nge.dm;
|
||||||
//
|
//
|
||||||
//import android.os.RemoteException;
|
//import android.os.RemoteException;
|
||||||
//import android.util.Log;
|
//import android.util.Log;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.autonavi.nge.guidance;//package com.autonavi.nge.guidance;
|
//package com.autonavi.nge.guidance;
|
||||||
//
|
//
|
||||||
//import android.util.Log;
|
//import android.util.Log;
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -10,11 +10,88 @@ class HDMapProvider {
|
|||||||
/**f:设置redis源。1,测试redis(42)。非1,正式redis(根据域名访问的)。默认,非1 */
|
/**f:设置redis源。1,测试redis(42)。非1,正式redis(根据域名访问的)。默认,非1 */
|
||||||
@JvmStatic external fun setDataRedisSource(source: Int)
|
@JvmStatic external fun setDataRedisSource(source: Int)
|
||||||
|
|
||||||
|
/** 是否开启地图数据调试信息的展示*/
|
||||||
|
@JvmStatic external fun toggleMapDataDebugInfo(open: Boolean)
|
||||||
|
|
||||||
|
/** 是否开启Systrace*/
|
||||||
|
@JvmStatic external fun toggleSystrace(open: Boolean)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置Redis数据加载回调
|
||||||
|
*/
|
||||||
|
@JvmStatic external fun setRedisDataLoadCallback(callback: IRedisLoadCallback)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
System.loadLibrary("hdmap")
|
System.loadLibrary("hdmap")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface IRedisLoadCallback {
|
||||||
|
/**
|
||||||
|
* 登录开始
|
||||||
|
*/
|
||||||
|
fun onLoginStart(ip: String, port: Int, password: String, dbIndex: Int) { }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录失败
|
||||||
|
*/
|
||||||
|
fun onLoginFailed(error: String?) { }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录成功
|
||||||
|
*/
|
||||||
|
fun onLoginSuccess() { }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录成功之后,重新开始登录
|
||||||
|
* @param isCanRetry: true -> 可以再次重试; false-> 不可以再次重试
|
||||||
|
*/
|
||||||
|
fun onReLogin(isCanRetry: Boolean) { }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求 加载指定瓦片数据 开始
|
||||||
|
* @param layerId: redis中指哈希表中的键
|
||||||
|
* @param tileId: 要获取的指定瓦片ID的数据
|
||||||
|
*/
|
||||||
|
fun onTileLoadStart(layerId: String, tileId: String) { }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求加载瓦片数据成功
|
||||||
|
* @param layerId: redis中指哈希表中的键
|
||||||
|
* @param tileId: 要获取的指定瓦片ID的数据
|
||||||
|
*/
|
||||||
|
fun onTileLoadSuccess(layerId: String, tileId: String) { }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求加载瓦片数据失败
|
||||||
|
* @param layerId: redis中指哈希表中的键
|
||||||
|
* @param tileId: 要获取的指定瓦片ID的数据
|
||||||
|
*/
|
||||||
|
fun onTileLoadFail(layerId: String, tileId: String, error: String) { }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求同时加载多个瓦片数据开始
|
||||||
|
* @param layerId: redis中指哈希表中的键
|
||||||
|
* @param tileIds: 要获取的指定瓦片ID列表的集合
|
||||||
|
*/
|
||||||
|
fun onTilesLoadStart(layerId: String, tileIds: List<String>) { }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同时加载多个瓦片数据成功
|
||||||
|
* @param layerId: redis中指哈希表中的键
|
||||||
|
* @param tileIds: 要获取的指定瓦片ID列表的集合
|
||||||
|
*/
|
||||||
|
fun onTilesLoadSuccess(layerId: String, tileIds: List<String>) { }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同时加载多个瓦片数据失败
|
||||||
|
* @param layerId: redis中指哈希表中的键
|
||||||
|
* @param tileIds: 要获取的指定瓦片ID列表的集合
|
||||||
|
* @param error: 加载失败的异常信息
|
||||||
|
*/
|
||||||
|
fun onTilesLoadFail(layerId: String, tileIds: List<String>, error: String?) { }
|
||||||
|
}
|
||||||
|
|
||||||
fun getLaneCenterLine(tileId: Int, routeId: Int): ArrayList<HDMapBlock>? {
|
fun getLaneCenterLine(tileId: Int, routeId: Int): ArrayList<HDMapBlock>? {
|
||||||
return if (mObj != 0L) {
|
return if (mObj != 0L) {
|
||||||
getLaneCenterLineJni(mObj, tileId, routeId)
|
getLaneCenterLineJni(mObj, tileId, routeId)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ interface IMarkerController {
|
|||||||
/**
|
/**
|
||||||
* 批量更新他车
|
* 批量更新他车
|
||||||
*/
|
*/
|
||||||
fun updateBatchMarkerPositon(batchMarkerOptions: com.zhidaoauto.map.sdk.open.renders.marker.BatchMarkerOptions)
|
fun updateBatchMarkerPositon(batchMarkerOptions: BatchMarkerOptions)
|
||||||
//根据车辆类型预添加车辆模型
|
//根据车辆类型预添加车辆模型
|
||||||
fun addPreVehicleModel(type:Int,modelRes:Int):String?
|
fun addPreVehicleModel(type:Int,modelRes:Int):String?
|
||||||
//添加普通模型
|
//添加普通模型
|
||||||
|
|||||||
@@ -93,6 +93,9 @@ class RoadHelper private constructor() {
|
|||||||
cacheHdDataProgressJob?.cancel()
|
cacheHdDataProgressJob?.cancel()
|
||||||
cacheHdDataProgressJob = null
|
cacheHdDataProgressJob = null
|
||||||
|
|
||||||
|
mHdDataDownloadListener?.clear()
|
||||||
|
mHdDataDownloadListener = null
|
||||||
|
|
||||||
cancelCacheHDData()
|
cancelCacheHDData()
|
||||||
|
|
||||||
hdMapProvider.release()
|
hdMapProvider.release()
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ class MarkerSimpleData {
|
|||||||
var color: String = ""
|
var color: String = ""
|
||||||
//颜色设置类型 0 直接替换 1=由原色变为指定色 有方向 * 2=由指定色变为原色 有方向 * 3=由原色变为指定色 无方向 * 4=由指定色变为原色 无方向
|
//颜色设置类型 0 直接替换 1=由原色变为指定色 有方向 * 2=由指定色变为原色 有方向 * 3=由原色变为指定色 无方向 * 4=由指定色变为原色 无方向
|
||||||
var colorType: Int = 0
|
var colorType: Int = 0
|
||||||
|
// 变色角度
|
||||||
|
var colorAngle:Int = 0
|
||||||
//文本
|
//文本
|
||||||
var text: String = ""
|
var text: String = ""
|
||||||
//状态
|
//状态
|
||||||
|
|||||||
@@ -341,16 +341,17 @@ open class MapAutoView : FrameLayout, LonLatPointListener, ITraffic,ILockLocatio
|
|||||||
mEventController = MapEventController()
|
mEventController = MapEventController()
|
||||||
}
|
}
|
||||||
|
|
||||||
mMapView?.let {
|
mMapView?.let { itx ->
|
||||||
if (CompileConfig.DEBUG) {
|
if (CompileConfig.DEBUG) {
|
||||||
Log.i(TAG, "autoop-mapop-create--${mMapView}")
|
Log.i(TAG, "autoop-mapop-create--${mMapView}")
|
||||||
}
|
}
|
||||||
it.setEventController(mEventController)
|
itx.setEventController(mEventController)
|
||||||
addView(it)
|
addView(itx)
|
||||||
|
|
||||||
|
Log.d(TAG, "--- controller assign -->")
|
||||||
mMapController =
|
mMapController =
|
||||||
MapController(context, it, this@MapAutoView, mEventController, mMapStyleParams)
|
MapController(context, itx, this@MapAutoView, mEventController, mMapStyleParams)
|
||||||
|
locationClient?.takeIf { it.mMapController == null }?.also { it.mMapController = mMapController }
|
||||||
mMapController?.let { mapController ->
|
mMapController?.let { mapController ->
|
||||||
mMarkerController = MarkerController(mapController)
|
mMarkerController = MarkerController(mapController)
|
||||||
mapController.setMarkerController(mMarkerController)
|
mapController.setMarkerController(mMarkerController)
|
||||||
@@ -358,8 +359,8 @@ open class MapAutoView : FrameLayout, LonLatPointListener, ITraffic,ILockLocatio
|
|||||||
mLocationView = LocationHelper(context, mMarkerController, mMapController,mMapStyleParams)
|
mLocationView = LocationHelper(context, mMarkerController, mMapController,mMapStyleParams)
|
||||||
mMapController?.setLocalView(mLocationView)
|
mMapController?.setLocalView(mLocationView)
|
||||||
|
|
||||||
it.setMapController(mMapController)
|
itx.setMapController(mMapController)
|
||||||
it.mITraffic = this@MapAutoView
|
itx.mITraffic = this@MapAutoView
|
||||||
// init PanelManager
|
// init PanelManager
|
||||||
mPanelManager = PanelManager(this@MapAutoView, context, mMapController)
|
mPanelManager = PanelManager(this@MapAutoView, context, mMapController)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,8 +51,7 @@ dependencies {
|
|||||||
implementation rootProject.ext.dependencies.arouter
|
implementation rootProject.ext.dependencies.arouter
|
||||||
kapt rootProject.ext.dependencies.aroutercompiler
|
kapt rootProject.ext.dependencies.aroutercompiler
|
||||||
// 高精地图
|
// 高精地图
|
||||||
// implementation rootProject.ext.dependencies.mogocustommap
|
implementation rootProject.ext.dependencies.mogocustommap
|
||||||
implementation project(':libraries:mapmodule')
|
|
||||||
|
|
||||||
// 高德地图
|
// 高德地图
|
||||||
api rootProject.ext.dependencies.amapnavi3dmap
|
api rootProject.ext.dependencies.amapnavi3dmap
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ include ':libraries:mogo-map'
|
|||||||
include ':libraries:mogo-adas'
|
include ':libraries:mogo-adas'
|
||||||
include ':libraries:mogo-adas-data'
|
include ':libraries:mogo-adas-data'
|
||||||
include ':libraries:mogo-obu'
|
include ':libraries:mogo-obu'
|
||||||
include ':libraries:mapmodule'
|
//include ':libraries:mapmodule'
|
||||||
|
|
||||||
// 语音
|
// 语音
|
||||||
include ':tts:tts-base'
|
include ':tts:tts-base'
|
||||||
|
|||||||
Reference in New Issue
Block a user