Merge remote-tracking branch 'origin/dev_minibus-d_230425_3.2.0' into dev_minibus-d_230425_3.2.0

This commit is contained in:
wangmingjun
2023-05-19 14:32:28 +08:00
46 changed files with 271 additions and 215 deletions

View File

@@ -50,13 +50,6 @@ android {
dimension "vehicle"
buildConfigField 'int', 'NEW_TEST', '0'
}
// 小巴车 接驳车 这个维度应该放入的最外层 但是和小巴的代码耦合的太严重放到了这个地方
// 乘客端删除了这个flavors 是因为乘客端这个地方比较简单
shuttle {
dimension "vehicle"
buildConfigField 'int', 'NEW_TEST', '1'
}
}
}

View File

@@ -300,10 +300,14 @@
</RelativeLayout>
<com.mogo.eagle.core.function.hmi.ui.widget.RomaView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_badcase_rl"/>
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
app:layout_constraintBottom_toBottomOf="@id/module_mogo_och_badcase_rl"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_badcase_rl"
app:layout_constraintTop_toTopOf="@id/module_mogo_och_badcase_rl"
app:roma_open_bg="@drawable/bus_operation_status_select_bg"
app:roma_close_bg="@drawable/bus_operation_status_bg"
/>
<com.mogo.och.bus.view.SlidePanelView
android:id="@+id/module_mogo_och_slide_panel"

View File

@@ -666,14 +666,16 @@ object CharterPassengerModel {
mogoLocation.latitude = orderLonLat.latitude
lastSumLength = CoordinateUtils.calculateLineDistance(
orderLonLat.longitude,
orderLonLat.latitude,
it.longitude,
it.latitude,
mogoLocation.longitude,
mogoLocation.latitude
)
if(lastSumLength>100) {
ToastUtils.showLong("缺少轨迹数据")
if (mRoutePoints.size == 0) return
if (mRoutePoints.size == 0){
ToastUtils.showLong("缺少轨迹数据")
return
}
// 计算距离
lastSumLength =
CoordinateCalculateRouteUtil.calculateRouteSumLength(
@@ -1055,9 +1057,15 @@ object CharterPassengerModel {
}
private fun invokeStationDistanceListener(meters:Long , timeInSecond:Long){
var tempMeters = meters
var tempTimeInSecond = timeInSecond
if (orderInfo?.arriveStatus == OrderInfoResponse.ARRIVED) {
tempMeters = -1
tempTimeInSecond = -1
}
UiThreadHandler.post({
for (value in stationDistanceListener.values) {
value.setDistancecAndTime(meters,timeInSecond)
value.setDistancecAndTime(tempMeters,tempTimeInSecond)
}
}, UiThreadHandler.MODE.QUEUE)

View File

@@ -76,7 +76,7 @@ internal interface PassengerServiceApi {
): Observable<BaseData>
/**
* 06结束订单 03
* 06到达目的地 03
*/
@POST("/och-rental-cabin/api/flow/v1/driver/arriveDest")
fun arriveDest(

View File

@@ -23,6 +23,7 @@ import com.mogo.och.common.module.utils.DateTimeUtil
import com.mogo.och.common.module.utils.RxUtils
import com.mogo.och.common.module.utils.SoundPoolHelper
import com.mogo.och.common.module.voice.VoiceNotice
import com.mogo.tts.base.IMogoTTSCallback
object DriverMessage: IReceivedMsgListener {
override fun onReceivedMsg(type: Int, byteArray: ByteArray) {
@@ -55,7 +56,7 @@ object DriverMessage: IReceivedMsgListener {
VoiceNotice.showNotice(msg.msg, AIAssist.LEVEL1)
if(msg.msg.contains("核销成功")){
val string = AbsMogoApplication.getApp().getString(R.string.m1_welcome_tts)
VoiceNotice.showNotice(string, AIAssist.LEVEL1,15_000)
VoiceNotice.showNotice(string, AIAssist.LEVEL1,4_000)
}
}
}

View File

@@ -57,8 +57,10 @@ class OrderLineItemAdapter(
val lineInfo = dataList[holder.bindingAdapterPosition]
if(lineInfo.isCheck){
holder.lineNameTextView.setBackgroundResource(R.drawable.m1_order_line_checked_shape)
holder.lineNameTextView.setTextColor(context.getColor(R.color.bus_p_m1_1466FB))
}else{
holder.lineNameTextView.setBackgroundResource(android.R.color.transparent)
holder.lineNameTextView.setTextColor(context.getColor(R.color.bus_p_m1_292c39))
}
holder.lineNameTextView.text = lineInfo.name
holder.lineNameTextView.setOnClickListener {

View File

@@ -16,6 +16,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
import com.mogo.eagle.core.utilcode.util.AppStateManager
import com.mogo.eagle.core.utilcode.util.BarUtils
import com.mogo.eagle.core.utilcode.util.ClickUtils
import com.mogo.eagle.core.utilcode.util.KeyboardUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.bus.passenger.R
import com.mogo.och.bus.passenger.presenter.DebugWatchDogPresenter
@@ -48,6 +49,9 @@ class DebugViewWatchDogFragment :
}else{
if(text.toString() == "123987"){
dismissAllowingStateLoss()
dialog?.window?.let {
KeyboardUtils.hideSoftInput(it)
}
ToggleDebugView.toggleDebugView.toggle(requireContext())
}else{
ToastUtils.showShort("请输入正确密码")
@@ -55,6 +59,9 @@ class DebugViewWatchDogFragment :
}
}
actv_cancle.setOnClickListener {
dialog?.window?.let {
KeyboardUtils.hideSoftInput(it)
}
dismissAllowingStateLoss()
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="@dimen/dp_7_5"/>
<solid android:color="@color/bus_p_m1_a3bdf2" />
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<corners android:radius="5dp"/>
<solid android:color="@android:color/transparent" />
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<scale android:scaleWidth="100%">
<shape android:shape="rectangle">
<corners android:radius="5dp"/>
<gradient android:startColor="@color/bus_p_m1_56c59c" android:endColor="@color/bus_p_m1_56efa0" android:angle="0"/>
</shape>
</scale>
</item>
</layer-list>

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="5dp"/>
<solid android:color="#99D8D8D8" />
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<corners android:radius="5dp"/>
<solid android:color="#66FFFFFF" />
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<scale android:scaleWidth="100%">
<shape android:shape="rectangle">
<corners android:radius="5dp"/>
<gradient android:startColor="#303CFF" android:centerColor="#216CFF" android:endColor="#25C1F9" android:angle="0"/>
</shape>
</scale>
</item>
</layer-list>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/dp_18"/>
<solid android:color="@color/bus_p_m1_CCFFFFFF"/>
</shape>

View File

@@ -2,5 +2,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/dp_39"/>
<gradient android:startColor="@color/bus_p_m1_1466FB" android:endColor="@color/bus_p_m1_43CEFE"/>
<gradient android:startColor="@color/bus_p_m1_1466FB" android:endColor="@color/bus_p_m1_43CEFE" android:angle="@integer/keyCode_0"/>
</shape>

View File

@@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="@dimen/dp_7_5"/>
<corners android:radius="5dp"/>
<solid android:color="@color/bus_p_m1_a3bdf2" />
</shape>
</item>
@@ -11,7 +11,7 @@
<clip>
<shape>
<corners android:radius="5dp"/>
<solid android:color="@android:color/transparent" />
<solid android:color="@color/bus_p_m1_a3bdf2" />
</shape>
</clip>
</item>
@@ -19,7 +19,7 @@
<scale android:scaleWidth="100%">
<shape android:shape="rectangle">
<corners android:radius="5dp"/>
<gradient android:startColor="@color/bus_p_m1_56c59c" android:endColor="@color/bus_p_m1_56efa0"/>
<gradient android:startColor="@color/bus_p_m1_6edbdc" android:endColor="@color/bus_p_m1_56efa0" android:angle="0"/>
</shape>
</scale>
</item>

View File

@@ -20,7 +20,7 @@
app:layout_constraintStart_toStartOf="@+id/aciv_center_image"
app:layout_constraintEnd_toEndOf="@+id/aciv_center_image"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="@dimen/dp_9_5"
android:layout_marginBottom="@dimen/dp_4_5"
android:textSize="@dimen/dp_20"
android:text="靠边停车"
android:textColor="@color/bus_p_m1_090f28"

View File

@@ -31,8 +31,8 @@
android:id="@+id/actv_order_times"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@dimen/dp_31"
app:layout_constraintTop_toBottomOf="@+id/actv_order_phone"
app:layout_constraintBottom_toTopOf="@+id/actv_order_times_title"
android:layout_marginBottom="8dp"
android:text="--:-----:--"
android:textSize="@dimen/dp_36"
android:textColor="@color/bus_p_m1_0050E1"
@@ -43,8 +43,8 @@
android:id="@+id/actv_order_times_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@dimen/dp_8"
app:layout_constraintTop_toBottomOf="@+id/actv_order_times"
app:layout_constraintBottom_toTopOf="@+id/actv_end_order"
android:layout_marginBottom="@dimen/dp_25"
android:text="用车时间"
android:textSize="@dimen/dp_18"
android:textColor="@color/bus_p_m1_112b57"
@@ -56,8 +56,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/actv_order_times_title"
android:layout_marginTop="@dimen/dp_25"
android:layout_marginBottom="@dimen/dp_27"
android:background="@drawable/charter_p_shape_end_order"
android:gravity="center"
@@ -124,7 +122,8 @@
android:text="结束用车"
android:textSize="@dimen/dp_24"
android:textColor="@android:color/white"
app:layout_constraintTop_toBottomOf="@+id/actv_end_order_content"
android:layout_marginBottom="@dimen/dp_27"
app:layout_constraintBottom_toBottomOf="parent"
android:background="@drawable/charter_p_shape_end_order_left"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="@dimen/dp_30"
@@ -142,7 +141,8 @@
android:textSize="@dimen/dp_24"
android:textColor="@android:color/white"
android:background="@drawable/charter_p_shape_end_order"
app:layout_constraintTop_toBottomOf="@+id/actv_end_order_content"
android:layout_marginBottom="@dimen/dp_27"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_17"

View File

@@ -98,7 +98,7 @@
app:layout_constraintStart_toStartOf="@+id/ll_car_speed"
app:layout_constraintEnd_toEndOf="@+id/ll_car_speed"
android:background="@drawable/bus_p_distance_info_bg"
android:layout_width="@dimen/dp_112"
android:layout_width="@dimen/dp_115"
android:layout_height="@dimen/dp_346">
<TextView
@@ -108,6 +108,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@+id/tv_distance_unit"
app:layout_constraintVertical_chainStyle="packed"
android:fontFamily="@font/din"
android:text="--"
android:textSize="@dimen/dp_37"
android:textColor="@color/bus_p_m1_203555"
@@ -128,7 +129,7 @@
<View
android:id="@+id/v_line_01"
android:background="@drawable/bus_p_function_distance_split_bg"
android:background="@android:color/transparent"
app:layout_constraintVertical_bias="0.33"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
@@ -144,6 +145,7 @@
app:layout_constraintBottom_toTopOf="@+id/tv_distance_surplus_time_unit"
app:layout_constraintHorizontal_chainStyle="packed"
android:text="--"
android:fontFamily="@font/din"
android:textSize="@dimen/dp_37"
android:textColor="@color/bus_p_m1_203555"
android:layout_width="wrap_content"
@@ -163,7 +165,7 @@
<View
android:id="@+id/v_line_02"
android:background="@drawable/bus_p_function_distance_split_bg"
android:background="@android:color/transparent"
app:layout_constraintVertical_bias="0.66"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
@@ -178,6 +180,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintVertical_chainStyle="packed"
android:text="--"
android:fontFamily="@font/din"
android:textSize="@dimen/dp_37"
android:textColor="@color/bus_p_m1_203555"
android:layout_width="wrap_content"

View File

@@ -76,12 +76,13 @@
android:maxHeight="@dimen/dp_10"
android:minHeight="@dimen/dp_10"
android:background="@null"
android:progressDrawable="@drawable/taxi_video_seekbar_style" />
android:progressDrawable="@drawable/taxi_power_size_seekbar_style" />
<TextView
android:id="@+id/tv_power_cos"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginStart="@dimen/dp_7"
app:layout_constraintStart_toEndOf="@+id/progress"
android:textSize="@dimen/dp_22"
android:textColor="@color/bus_p_m1_1b2546"

View File

@@ -15,6 +15,7 @@
<color name="bus_p_m1_a3bdf2">#A3BDF2</color>
<color name="bus_p_m1_56c59c">#56C59C</color>
<color name="bus_p_m1_56efa0">#56EFA0</color>
<color name="bus_p_m1_6edbdc">#6EDBDC</color>
<color name="bus_p_m1_4a5375">#4A5375</color>
<color name="bus_p_m1_0f1e57">#0F1E57</color>
<color name="bus_p_m1_225eff">#225EFF</color>

View File

@@ -6,18 +6,15 @@ import android.net.Uri
import android.util.AttributeSet
import android.widget.ImageView
import android.widget.RelativeLayout
import com.mogo.eagle.core.utilcode.breakpoint.bean.ThreadBean
import com.mogo.eagle.core.utilcode.breakpoint.callback.IDownload
import com.mogo.eagle.core.utilcode.breakpoint.utils.DownloadUtils
import com.mogo.eagle.core.utilcode.download.*
import com.mogo.eagle.core.utilcode.download.callback.*
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.eagle.core.utilcode.util.FileUtils
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
import com.mogo.och.bus.passenger.R
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
import me.jessyan.autosize.utils.AutoSizeUtils
import java.io.File
/**
@@ -159,9 +156,13 @@ class AdvanceVideoView @JvmOverloads constructor(
//下载视频, 下载成功后再播放
Logger.d(ImageAndVideoRotation.TAG, "startDownLoadVideo")
FileUtils.createFileDir(mVideoDirPath)
DownloadUtils.downLoad(
context, fileNetPath, mVideoDirPath, downloadVideoName, 5, downListener
)
val downloadUrl = fileNetPath
val downloadDir = mVideoDirPath
if (downloadUrl != null && downloadDir != null) {
DownloadUtils.downLoad(
context, downloadUrl, downloadDir, downloadVideoName, downListener
)
}
}
fun startPlay(localVideoPath: String?) {
@@ -202,40 +203,40 @@ class AdvanceVideoView @JvmOverloads constructor(
}
}
private val downListener = object : IDownload {
override fun onStart(url: String?) {
private val downListener = object : IDownloadListener {
override fun onStart(url: String) {
setCacheImageViewVisible()
Logger.d(ImageAndVideoRotation.TAG, "download-onStart")
}
override fun onPause(url: String?, threadBean: ThreadBean?) {
Logger.d(ImageAndVideoRotation.TAG, "download-onPause")
// UiThreadHandler.postDelayed(Runnable {
// startDownLoadVideo()
// },DOWNLOAD_DELAY)
// todo 测试下网络断掉是否会走onpause且网络回复也不会继续下载
// override fun onPause(url: String, threadBean: ThreadBean?) {
// Logger.d(ImageAndVideoRotation.TAG, "download-onPause")
//// UiThreadHandler.postDelayed(Runnable {
//// startDownLoadVideo()
//// },DOWNLOAD_DELAY)
// // todo 测试下网络断掉是否会走onpause且网络回复也不会继续下载
// }
override fun onProgress(url: String, downloaded: Long, total: Long) {
Logger.d(ImageAndVideoRotation.TAG, "download-onProgress== ${ (downloaded * 1.0f * 100/total).toInt() }")
}
override fun onProgress(url: String?, length: Int) {
Logger.d(ImageAndVideoRotation.TAG, "download-onProgress== $length")
}
override fun onFinished(url: String?, threadBean: ThreadBean?, localPath: String?) {
override fun onFinished(url: String, path: String) {
Logger.d(ImageAndVideoRotation.TAG, "download-onFinished = $url")
if (url.equals(fileNetPath)) { //发现下载工具在断网又连网后,已完成的任务又都下载,跳转播放出现问题
//下载完成
ThreadUtils.runOnUiThread {
startPlay(Uri.fromFile(File(mVideoDirPath + downloadVideoName)).toString())
startPlay(Uri.fromFile(File(path)).toString())
}
} else {//如果当前文件不存在再次去下载当前的
Logger.d(
ImageAndVideoRotation.TAG, "download-onFinished = not current" +
",currentUrl = $fileNetPath "
)
if (FileUtils.isFileExists(mVideoDirPath + downloadVideoName)) {
if (FileUtils.isFileExists(path)) {
Logger.d(ImageAndVideoRotation.TAG, "have download startPlay")
ThreadUtils.runOnUiThread {
startPlay(Uri.fromFile(File(mVideoDirPath + downloadVideoName)).toString())
startPlay(Uri.fromFile(File(path)).toString())
}
return
} else {
@@ -244,14 +245,10 @@ class AdvanceVideoView @JvmOverloads constructor(
}
}
override fun onError(url: String?, errorMsg: String?) {
Logger.d(ImageAndVideoRotation.TAG, "download-onError-$errorMsg")
override fun onError(url: String, error: String?) {
Logger.d(ImageAndVideoRotation.TAG, "download-onError-$error")
//出错再次下载
if (errorMsg != null) {
if (errorMsg.startsWith("initFailed")) {
startDownLoadVideo()
}
}
startDownLoadVideo()
}
}
}

View File

@@ -321,10 +321,15 @@
</LinearLayout>
<com.mogo.eagle.core.function.hmi.ui.widget.RomaView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/module_och_taxi_badcase_ll"/>
android:layout_width="@dimen/module_mogo_och_operation_status_bg_height"
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
app:layout_constraintBottom_toBottomOf="@id/module_och_taxi_badcase_ll"
app:layout_constraintLeft_toRightOf="@id/module_och_taxi_badcase_ll"
app:layout_constraintTop_toTopOf="@id/module_och_taxi_badcase_ll"
app:roma_open_bg="@drawable/taxi_operation_status_select_bg"
app:roma_close_bg="@drawable/taxi_operation_status_bg"
android:layout_marginStart="40dp"
/>
<!-- <LinearLayout-->
<!-- android:id="@+id/module_och_taxi_ai_collect_ll"-->

View File

@@ -92,6 +92,7 @@ android {
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}

View File

@@ -25,7 +25,7 @@ project.android.variantFilter { variant ->
def vehicleContain = true
roleValue.each{vehicleValue->
if (names.contains(vehicleValue)) {
println "need $names"
//println "need $names"
vehicleContain = false
}
}

View File

@@ -1,3 +1,4 @@
apply from: "./script/utils.gradle"
// 网约车服务:仅小巴车、出租车渠道用
project.dependencies {
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
@@ -14,7 +15,44 @@ project.dependencies {
// fMultiDisplayOchTaxiImplementation(rootProject.ext.dependencies.mogoochtaxi)
} else {
fPadLenovoImplementation (project(':OCH:mogo-och-noop'))
if (isCurrentDriver("noop")) {
fPadLenovoImplementation(project(':OCH:mogo-och-noop'))
}
if (isCurrentDriver("bus")) {
implementation project.project(':OCH:mogo-och-bus')
} else if (isCurrentPassenger("bus")) {
implementation project.project(':OCH:mogo-och-bus-passenger')
} else {
}
if (isCurrentDriver("charter")) {
implementation project.project(':OCH:mogo-och-charter')
} else if (isCurrentPassenger("charter")) {
implementation project.project(':OCH:mogo-och-charter-passenger')
} else {
}
if (isCurrentDriver("shuttle")) {
implementation project(':OCH:mogo-och-shuttle')
} else if (isCurrentPassenger("shuttle")) {
implementation project.project(':OCH:mogo-och-shuttle-passenger')
} else {
}
if (isCurrentFlavors("sweeper")) {
implementation project.project(':OCH:mogo-och-sweeper')
}
if (isCurrentDriver("taxi")) {
implementation project.project(':OCH:mogo-och-taxi')
} else if (isCurrentPassenger("taxi")) {
implementation project.project(':OCH:mogo-och-taxi-passenger')
} else {
}
// 多屏幕-Bus司机端
// fMultiDisplayOchBusImplementation (project(':OCH:mogo-och-bus'))

View File

@@ -24,13 +24,6 @@ project.android.productFlavors {
// ④构建 是否支持多屏异显异交互
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
if(isCurrentDriver("bus")){
project.dependencies.add('implementation', project.project(':OCH:mogo-och-bus'))
}
if(isCurrentPassenger("bus")){
project.dependencies.add('implementation', project.project(':OCH:mogo-och-bus-passenger'))
}
}
}

View File

@@ -1,4 +1,4 @@
apply from: "./script/utils.gradle"
project.android.productFlavors {
// 包车业务
@@ -24,12 +24,11 @@ project.android.productFlavors {
if(isCurrentDriver("charter")){
// ③是否需要重写状态栏
buildConfigField 'boolean', 'IS_REPLACE_STATUSVIEW', 'false'
project.dependencies.add('implementation', project.project(':OCH:mogo-och-charter'))
}
if(isCurrentPassenger("charter")){
}else if(isCurrentPassenger("charter")){
// ③是否需要重写状态栏
buildConfigField 'boolean', 'IS_REPLACE_STATUSVIEW', 'true'
project.dependencies.add('implementation', project.project(':OCH:mogo-och-charter-passenger'))
}else {
buildConfigField 'boolean', 'IS_REPLACE_STATUSVIEW', 'true'
}
}
}

View File

@@ -23,10 +23,5 @@ project.android.productFlavors {
// ④构建 是否支持多屏异显异交互
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
if(isCurrentDriver("noop")){
project.dependencies.add('implementation', project.project(':OCH:mogo-och-noop'))
}
}
}

View File

@@ -23,26 +23,28 @@ project.android.productFlavors {
buildConfigField 'boolean', 'IS_REPLACE_STATUSVIEW', 'false'
// ④构建 是否支持多屏异显异交互
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
project.dependencies.add('implementation', project.project(':OCH:mogo-och-shuttle'))
manifestPlaceholders.put("SCREEN_ORIENTATION", "landscape")
}
if (isCurrentPassenger("shuttle")) {
if(isM2()){
} else if (isCurrentPassenger("shuttle")) {
if (isM2()) {
// ③是否需要重写状态栏
buildConfigField 'boolean', 'IS_REPLACE_STATUSVIEW', 'true'
// ④构建 是否支持多屏异显异交互
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
manifestPlaceholders.put("SCREEN_ORIENTATION", "portrait")
}
if(isJL()){
if (isJL()) {
// ③是否需要重写状态栏
buildConfigField 'boolean', 'IS_REPLACE_STATUSVIEW', 'true'
// ④构建 是否支持多屏异显异交互
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
manifestPlaceholders.put("SCREEN_ORIENTATION", "landscape")
}
project.dependencies.add('implementation', project.project(':OCH:mogo-och-shuttle-passenger'))
} else {
// ③是否需要重写状态栏
buildConfigField 'boolean', 'IS_REPLACE_STATUSVIEW', 'true'
// ④构建 是否支持多屏异显异交互
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
manifestPlaceholders.put("SCREEN_ORIENTATION", "landscape")
}
}
}

View File

@@ -23,10 +23,5 @@ project.android.productFlavors {
// ④构建 是否支持多屏异显异交互
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
if(isCurrentFlavors("sweeper")){
project.dependencies.add('implementation', project.project(':OCH:mogo-och-sweeper'))
}
}
}

View File

@@ -21,14 +21,13 @@ project.android.productFlavors {
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
if (isCurrentDriver("taxi")) {
project.dependencies.add('implementation', project.project(':OCH:mogo-och-taxi'))
// 在启动的时候把Task给清空
manifestPlaceholders.put("ACTIVITY_ROOT", true)
}
if (isCurrentPassenger("taxi")) {
project.dependencies.add('implementation', project.project(':OCH:mogo-och-taxi-passenger'))
}else if (isCurrentPassenger("taxi")) {
// 在启动的时候把Task给清空
manifestPlaceholders.put("ACTIVITY_ROOT", false)
}else {
manifestPlaceholders.put("ACTIVITY_ROOT", false)
}
}
}

View File

@@ -2,7 +2,9 @@ project.android.productFlavors {
// 衡阳-联想Pad-网约车-小巴车
ochJL {
dimension "vehicle"
matchingFallbacks = ['jinlvvan']
//matchingFallbacks = ['jinlvvan']
missingDimensionStrategy "vehicle", "jinlvvan", "m2", "jinlvvan"
// 配置AndroidManifest.xml中用到的参数
manifestPlaceholders = [

View File

@@ -5,6 +5,8 @@ project.android.productFlavors {
ochM1 {
dimension "vehicle"
missingDimensionStrategy "vehicle", "driverm1","m2", "jinlvvan"
// 配置AndroidManifest.xml中用到的参数
manifestPlaceholders = [
// BUGLY_APP_CHANNEL

View File

@@ -3,9 +3,9 @@ project.android.productFlavors {
ochM2 {
dimension "vehicle"
// 和 och/mogo-och-bus-passenger 的flavors的m2对应
matchingFallbacks = ['m2']
//matchingFallbacks = ['m2']
missingDimensionStrategy "vehicle", "m2", "jinlvvan", 'driverm1'
//高德地图鉴权信息
manifestPlaceholders = [
CHANNEL_VALUE_TAIL: "M2",

View File

@@ -28,7 +28,7 @@ ext {
amapsearch : "com.amap.api:search:9.5.0",
amaplocation : "com.amap.api:location:6.2.0",
downloader : "com.mogo.core.net:downloader:1.0.5_stable",
downloader : "com.mogo.core.net:downloader:1.0.6.1",
// json 转换
gson : "com.google.code.gson:gson:2.8.4",

View File

@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.hmi.ui.widget
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.appcompat.content.res.AppCompatResources
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.function.api.map.roma.IMoGoRomaListener
import com.mogo.eagle.core.function.call.map.CallerMapIdentifyManager.romaTrigger
@@ -26,8 +27,30 @@ class RomaView @JvmOverloads constructor(
@Volatile
private var click = true
private val normalRes: Int
private val openRes: Int
init {
LayoutInflater.from(context).inflate(R.layout.view_roma_bg, this, true)
val a = context.obtainStyledAttributes(
attrs,
R.styleable.RomaView,
defStyleAttr,
0
)
normalRes = a.getResourceId(
R.styleable.RomaView_roma_close_bg,
R.drawable.romabg_normal_select
)
openRes = a.getResourceId(
R.styleable.RomaView_roma_open_bg,
R.drawable.romabg_press_select_bg
)
a.recycle()
if(normalRes!=0){
ll_roma_bg.background = AppCompatResources.getDrawable(context, normalRes)
}
setOnClickListener {
if(!click){
return@setOnClickListener
@@ -44,11 +67,19 @@ class RomaView @JvmOverloads constructor(
click = true
if (status) {
romaMode = true
ll_roma_bg.setBackgroundResource(R.drawable.romabg_press_select_bg)
if(openRes!=0){
ll_roma_bg.setBackgroundResource(openRes)
}else{
ll_roma_bg.setBackgroundResource(R.drawable.romabg_press_select_bg)
}
ivRomaView.setBackgroundResource(R.drawable.roma_press_select_bg)
} else {
romaMode = false
ll_roma_bg.setBackgroundResource(R.drawable.roma_bg_selector)
if(normalRes!=0){
ll_roma_bg.setBackgroundResource(normalRes)
}else{
ll_roma_bg.setBackgroundResource(R.drawable.roma_bg_selector)
}
ivRomaView.setBackgroundResource(R.drawable.romafront_select_bg)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -8,7 +8,7 @@
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/icon_drag"
android:src="@drawable/icon_acceleration_drag"
android:padding="15dp"
android:layout_gravity="center_horizontal"
/>

View File

@@ -1,28 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll_roma_bg"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="@drawable/roma_bg_selector"
android:elevation="@dimen/dp_10"
>
<LinearLayout
android:id="@+id/ll_roma_bg"
android:layout_width="@dimen/dp_102"
android:layout_height="@dimen/dp_102"
android:layout_marginStart="40dp"
android:layout_marginBottom="@dimen/dp_46"
android:background="@drawable/roma_bg_selector"
android:elevation="@dimen/dp_10"
android:gravity="center"
android:orientation="vertical"
<ImageView
android:id="@+id/ivRomaView"
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_gravity="center"
android:background="@drawable/romafront_select_bg"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
app:layout_constraintRight_toRightOf="parent"
/>
<ImageView
android:id="@+id/ivRomaView"
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_gravity="center"
android:background="@drawable/romafront_select_bg" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -88,4 +88,10 @@
<attr name="roma_open" format="reference"/>
<attr name="roma_close" format="reference"/>
</declare-styleable>
<declare-styleable name="RomaView">
<attr name="roma_open_bg" format="reference"/>
<attr name="roma_close_bg" format="reference"/>
</declare-styleable>
</resources>

View File

@@ -67,13 +67,13 @@ class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
val distance = distanceOfCarToStopLine.get() + 5
if (hasCrossRoad && distance > 0) {
val prev = triggerLocation.get()
if (prev != null && loc != null) {
if (prev != null) {
travelled.set(MapTools.distance(loc.longitude, loc.latitude, prev.longitude, prev.latitude) + travelled.get())
triggerLocation.set(loc)
}
val oldRoadId = triggerRoadId.get()
Log.d(TAG, "-- onRoadIdInfo --: travelled --: ${travelled.get()}")
if ((travelled.get() > distance) && oldRoadId != null && oldRoadId != roadId) {
if ((travelled.get() > distance) && oldRoadId != roadId) {
distanceOfCarToStopLine.set(0.0)
hasCrossRoad = false
triggerRoadId.set(null)
@@ -152,10 +152,6 @@ class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
}
override fun changeAngle(scene: Scene) {
val appIdentityMode = FunctionBuildConfig.appIdentityMode
if (AppIdentityModeUtils.isBus(appIdentityMode) && AppIdentityModeUtils.isPassenger(appIdentityMode)) {
return
}
if(mLevel){
return
}

View File

@@ -114,18 +114,9 @@ class AiCloudIdentifyDataManager : IMogoMapListener,
}
fun requestRangeOfIdentify(dataReceive: Boolean) {
// if (dataReceive) { //todo test
// // 请求地图开始漫游
// MogoMapUIController.getInstance().setRomaMode(FunctionBuildConfig.romaModeStyle)
// CallerMapRomaListener.invokeMapRoma(true)
// sendMsgToServer(TelematicConstant.OPEN_ROMA_STATUS, "3".toByteArray())
// } else {
// CallerMapRomaListener.invokeMapRoma(false)
// sendMsgToServer(TelematicConstant.OPEN_ROMA_STATUS, "4".toByteArray())
// }
val status = MogoStatusManager.getInstance().isSocketOnLine
val gnss = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().gnssInfo
MapBizTrace.log(TAG,"开启请求data:$dataReceive , socketStatus:$status , lon:${gnss.longitude} , lat:${gnss.latitude}")
MapBizTrace.log(TAG,"开启请求data:$dataReceive , socketStatus:$status , lon:${gnss.longitude} , lat:${gnss.latitude} , heading:${gnss.heading}")
aiCloudIdentifyNetWorkModel.requestIdentifyRange(dataReceive, gnss.longitude,gnss.latitude,{
MapBizTrace.log(
TAG,

View File

@@ -1,13 +1,19 @@
package com.mogo.eagle.core.function.business.identify;
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA;
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_ADAS;
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED;
import static com.mogo.eagle.core.function.business.identify.TrackManager.LIMIT_SPEED;
import android.annotation.SuppressLint;
import com.mogo.eagle.core.data.enums.TrafficTypeEnum;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.utilcode.geometry.S2CellId;
import com.mogo.eagle.core.utilcode.geometry.S2LatLng;
import com.mogo.eagle.core.utilcode.util.CoordinateUtils;
import com.mogo.eagle.core.utilcode.util.ParseVersionUtils;
import com.zhjt.service.chain.ChainLog;
import java.util.Arrays;
import java.util.Comparator;
@@ -45,9 +51,30 @@ public class TrackObj {
private void correct() {
calAverageSpeedAndType();
String dockerVersion = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getDockVersion();
if (dockerVersion != null && !dockerVersion.isEmpty()) {
try {
int version = ParseVersionUtils.parseVersion(true, dockerVersion);
if (version >= 310) {
return;
}
} catch (Exception e) {
logErrorOfVersion(dockerVersion);
}
}
calLoc();
}
@ChainLog(linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED,
linkCode = CHAIN_LINK_ADAS,
endpoint = 4,
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA,
paramIndexes = {0},
clientPkFileName = "sn")
private void logErrorOfVersion(String version) {
}
@SuppressLint("NewApi")
private void calAverageSpeedAndType() {
if (circleQueue.size() >= 3) {
@@ -68,7 +95,7 @@ public class TrackObj {
}
speedAverage = cal / objQueueList.size();
}
if(typeArray.length > 0){
if (typeArray.length > 0) {
typeArray = Arrays.stream(typeArray).sorted().toArray();
typeWeight = typeArray[typeArray.length / 2] == 0 ? cacheData.getType() : typeArray[typeArray.length / 2];
}
@@ -166,7 +193,7 @@ public class TrackObj {
return d;
}
public void clear(){
public void clear() {
circleQueue.clear();
s2CellId = null;
s2LatLng = null;

View File

@@ -1,5 +1,7 @@
package com.mogo.eagle.core.utilcode.util;
import static android.Manifest.permission.ACCESS_FINE_LOCATION;
import android.Manifest;
import android.annotation.TargetApi;
import android.app.Activity;
@@ -25,6 +27,7 @@ import java.util.Set;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import com.mogo.eagle.core.utilcode.constant.PermissionConstants;
@@ -156,7 +159,7 @@ public final class PermissionUtils {
public static void requestAccessFineLocation(final SimpleCallback callback) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (isGranted(Manifest.permission.ACCESS_FINE_LOCATION)) {
if (isGranted(ACCESS_FINE_LOCATION)) {
if (callback != null) {
callback.onGranted();
}
@@ -499,7 +502,10 @@ public final class PermissionUtils {
} else if (type == TYPE_DRAW_OVERLAYS) {
currentRequestCode = TYPE_DRAW_OVERLAYS;
startOverlayPermissionActivity(activity, TYPE_DRAW_OVERLAYS);
} else {
} else if (type == TYPE_ACCESS_FINE_LOCATION) {
currentRequestCode = TYPE_ACCESS_FINE_LOCATION;
ActivityCompat.requestPermissions(activity, new String[] { ACCESS_FINE_LOCATION }, currentRequestCode);
} else {
activity.finish();
Log.e("PermissionUtils", "type is wrong.");
}
@@ -523,8 +529,23 @@ public final class PermissionUtils {
@NonNull String[] permissions,
@NonNull int[] grantResults) {
activity.finish();
if (sInstance != null && sInstance.mPermissionsRequest != null) {
sInstance.onRequestPermissionsResult(activity);
if (requestCode == TYPE_ACCESS_FINE_LOCATION) {
for (int result : grantResults) {
if (result == PackageManager.PERMISSION_GRANTED) {
if (sSimpleCallback4AccessFineLocation != null) {
sSimpleCallback4AccessFineLocation.onGranted();
}
}
if (result == PackageManager.PERMISSION_DENIED) {
if (sSimpleCallback4AccessFineLocation != null) {
sSimpleCallback4AccessFineLocation.onDenied();
}
}
}
} else {
if (sInstance != null && sInstance.mPermissionsRequest != null) {
sInstance.onRequestPermissionsResult(activity);
}
}
}
@@ -570,7 +591,7 @@ public final class PermissionUtils {
if (sSimpleCallback4AccessFineLocation == null) {
return;
}
if (isGranted(Manifest.permission.ACCESS_FINE_LOCATION)) {
if (isGranted(ACCESS_FINE_LOCATION)) {
sSimpleCallback4AccessFineLocation.onGranted();
} else {
sSimpleCallback4AccessFineLocation.onDenied();

View File

@@ -41,15 +41,14 @@ public abstract class AbsMogoApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
AutoSize.checkAndInit(this);
ScreenHelper.setScreenConfig(this);
if (!shouldInit()) {
return;
}
AppStateManager.INSTANCE.init(this);
initRxJavaErrorHandler();
FinalizeCrashFixer.fix();
AutoSize.checkAndInit(this);
ScreenHelper.setScreenConfig(this);
Utils.init(this);
MogoServices.getInstance().init(this);
}