Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # gradle.properties # libraries/tanlulib/src/main/java/com/zhidao/roadcondition/service/CosStatusController.kt # modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt # modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/SimpleCoverVideoPlayer.kt
This commit is contained in:
@@ -45,13 +45,13 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
}
|
||||
|
||||
fun registerTakePhotoInterceptor(interceptor: TakePhotoInterceptor) {
|
||||
interceptor?.apply {
|
||||
interceptor.apply {
|
||||
interceptors.add(this)
|
||||
}
|
||||
}
|
||||
|
||||
fun unregisterTakePhotoInterceptor(interceptor: TakePhotoInterceptor) {
|
||||
interceptor?.apply {
|
||||
interceptor.apply {
|
||||
interceptors.remove(interceptor)
|
||||
}
|
||||
}
|
||||
@@ -152,14 +152,14 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
|
||||
fun release() {
|
||||
zdCarCoderController.release()
|
||||
interceptors?.clear()
|
||||
interceptors.clear()
|
||||
}
|
||||
|
||||
//拍照失败回调
|
||||
override fun onTakePhotoFail(photoType: Int, camera: Int) {
|
||||
trackGetPhoto(3)
|
||||
interceptors.forEach {
|
||||
it?.onTakePhotoFail(photoType, camera)
|
||||
it.onTakePhotoFail(photoType, camera)
|
||||
}
|
||||
val isCustom = CustomStatusHandler.pollPhotoStatus()
|
||||
val entity = TakeEntity(isCustom, 0L)
|
||||
@@ -190,7 +190,7 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
if (isCustom) {
|
||||
CosStatusController().sendInformationDirectly(
|
||||
INFO_TYPE_IMG,
|
||||
mutableMapOf("pic" to "" as String),
|
||||
mutableMapOf("pic" to ""),
|
||||
mType,
|
||||
entity,
|
||||
mainInfoId,
|
||||
@@ -215,8 +215,8 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
|
||||
var interceptor = false
|
||||
interceptors.forEach {
|
||||
interceptor = it?.intercept()
|
||||
it?.onTakePhotoSuccess(photoType, camera, photoPath)
|
||||
interceptor = it.intercept()
|
||||
it.onTakePhotoSuccess(photoType, camera, photoPath)
|
||||
}
|
||||
if (interceptor) {
|
||||
return
|
||||
@@ -352,11 +352,11 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
val entity = CustomStatusHandler.pollVideoStatus()
|
||||
|
||||
entity?.let {
|
||||
InformationUploadController.release(entity.id)
|
||||
Log.e(TAG, "getVideo onTakeVideoFail entity?.isCustom =" + entity?.isCustom)
|
||||
if (entity?.isCustom) {
|
||||
InformationUploadController.release(it.id)
|
||||
Log.e(TAG, "getVideo onTakeVideoFail entity?.isCustom =" + it.isCustom)
|
||||
// if (it.isCustom) {
|
||||
// sendGetInfoFailedReceiver(mType)
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
//失败了,传空地址,发起请求
|
||||
|
||||
@@ -27,11 +27,11 @@ object CosCallbackMapController : CosStatusCallback {
|
||||
this.uploadFailed = uploadFailed
|
||||
}
|
||||
|
||||
fun registerCallback(paths: List<String>, callback: CosStatusCallback) {
|
||||
fun registerCallback(paths: List<String?>?, callback: CosStatusCallback) {
|
||||
paths?.let { list ->
|
||||
list.forEach { path ->
|
||||
path?.let {
|
||||
map[path] = callback
|
||||
map[it] = callback
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class CosStatusController : CosStatusCallback {
|
||||
var mSpeed: Float = 0f
|
||||
|
||||
//上传文件
|
||||
fun uploadFile(picPath: MutableList<String>, entity: TakeEntity, type: String, mainInfoId: Long,
|
||||
fun uploadFile(picPath: MutableList<String?>?, entity: TakeEntity, type: String, mainInfoId: Long,
|
||||
fromType: String, longitude: Double, latitude: Double, speed: Float) {
|
||||
CosCallbackMapController.registerCallback(picPath, this)
|
||||
// CosLogger.setLogStatus(true)
|
||||
@@ -58,6 +58,9 @@ class CosStatusController : CosStatusCallback {
|
||||
this.mSpeed = speed
|
||||
Log.d(TAG, "uploadFile type===$type ---- mainInfoId =$mainInfoId ----mFromType = $mFromType ---- picPath = $picPath --speed = $speed")
|
||||
trackUploadCos(3)
|
||||
if(picPath == null){
|
||||
return
|
||||
}
|
||||
if (picPath.contains("backPic")) return
|
||||
//参数说明: paths:本地文件路径;(注:上传的本地路径不要重复);config:文件上传的优先级
|
||||
mPicEventId =
|
||||
@@ -174,7 +177,7 @@ class CosStatusController : CosStatusCallback {
|
||||
mSpeed
|
||||
)
|
||||
}
|
||||
Log.d(TAG, "delete file: ${localPath!!}")
|
||||
Log.d(TAG, "delete file: $localPath")
|
||||
CosCallbackMapController.unregisterCallback(localPath)
|
||||
deletePicFile(localPath)
|
||||
}
|
||||
|
||||
@@ -203,12 +203,12 @@ class MainService : Service() {
|
||||
"MainService",
|
||||
"getImageEvent url = " + getImageSuccessEvent.getImageUrl() + ">>>>type =" + getImageSuccessEvent.getType()
|
||||
)
|
||||
sendMarkerInfoReceiver(
|
||||
info.latitude,
|
||||
info.longitude,
|
||||
getImageSuccessEvent.getImageUrl(),
|
||||
getImageSuccessEvent.getType()
|
||||
)
|
||||
// sendMarkerInfoReceiver(
|
||||
// info.latitude,
|
||||
// info.longitude,
|
||||
// getImageSuccessEvent.getImageUrl(),
|
||||
// getImageSuccessEvent.getType()
|
||||
// )
|
||||
}
|
||||
|
||||
private fun sendMarkerInfoReceiver(lat: Double, lon: Double, imageUrl: String?, type: String?) {
|
||||
|
||||
@@ -272,7 +272,7 @@ class MainServiceController {
|
||||
) {
|
||||
Log.d(TAG, " geoLocation -- poiType = $poiType")
|
||||
LocationUtil.getInstance()
|
||||
.geoCodeLocation(locationInfo.toLatLngPoint(), { locInfo: LocationInfo ->
|
||||
.geoCodeLocation(locationInfo.toLatLngPoint(), {
|
||||
Log.d(TAG, "geoLocation -------start -->")
|
||||
postInformationMessage(
|
||||
getInformationBody(type, url, locationInfo, isCustom, trafficInfoType, isShare, poiType,mainInfoId,longitude,latitude, speed),
|
||||
|
||||
Reference in New Issue
Block a user