Merge remote-tracking branch 'origin/dev_robotaxi-d_240227_6.3.0' into dev_robotaxi-d_240227_6.3.0
This commit is contained in:
@@ -6,6 +6,7 @@ import android.os.Handler
|
||||
import android.os.HandlerThread
|
||||
import android.os.Message
|
||||
import android.text.TextUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
|
||||
//播放试听
|
||||
object Audition: MediaPlayer.OnPreparedListener,
|
||||
@@ -117,14 +118,8 @@ object Audition: MediaPlayer.OnPreparedListener,
|
||||
return false
|
||||
}
|
||||
|
||||
fun playOrStop(path: String): Boolean {
|
||||
return if (!TextUtils.equals(oldPath, path)) {
|
||||
play(path)
|
||||
true
|
||||
} else {
|
||||
stop()
|
||||
false
|
||||
}
|
||||
fun seekTo(progress: Int){
|
||||
mediaPlayer?.seekTo(progress)
|
||||
}
|
||||
|
||||
fun onDestroy() {
|
||||
@@ -141,10 +136,11 @@ object Audition: MediaPlayer.OnPreparedListener,
|
||||
}
|
||||
|
||||
override fun onCompletion(mp: MediaPlayer) {
|
||||
if (listener != null) {
|
||||
listener!!.onAuditionCompletion(oldPath)
|
||||
}
|
||||
val tempPath = oldPath
|
||||
oldPath = null
|
||||
if (listener != null) {
|
||||
listener!!.onAuditionCompletion(tempPath)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSeekComplete(mp: MediaPlayer) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.och.common.module.manager.auditionmanager
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.och.common.module.manager.distancemamager.IDistanceListener
|
||||
import com.mogo.och.common.module.manager.distancemamager.TrajectoryAndDistanceManager
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
@@ -10,6 +11,8 @@ object AuditionManager: AuditionCacheManager.DataChangeListener, Audition.OnAudi
|
||||
|
||||
private val dataChangeListeners: ConcurrentHashMap<String, MusicDataChangeListener> = ConcurrentHashMap()
|
||||
|
||||
private const val TAG = "AuditionManager"
|
||||
|
||||
init {
|
||||
AuditionCacheManager.addDataChangeListener(this)
|
||||
Audition.registerOnAuditionListener(this)
|
||||
@@ -89,6 +92,7 @@ object AuditionManager: AuditionCacheManager.DataChangeListener, Audition.OnAudi
|
||||
*/
|
||||
override fun onAuditionCompletion(path:String?) {
|
||||
val oldData = resetData()
|
||||
CallerLogger.d(TAG,"播放完成:${oldData?.songName}--${path}")
|
||||
if(oldData!=null&&oldData.path==path){
|
||||
dataChangeListeners.forEach {
|
||||
it.value.onMusicCompletion(oldData)
|
||||
@@ -153,4 +157,8 @@ object AuditionManager: AuditionCacheManager.DataChangeListener, Audition.OnAudi
|
||||
}
|
||||
}
|
||||
|
||||
fun seekTo(progress: Int) {
|
||||
Audition.seekTo(progress)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -487,6 +487,11 @@ public class BusPassengerModel {
|
||||
};
|
||||
|
||||
private final IMoGoAutopilotStatusListener mGoAutopilotStatusListener = new IMoGoAutopilotStatusListener(){
|
||||
@Override
|
||||
public void onSsmReceiveTimeout(boolean isTimeout) {
|
||||
// IMoGoAutopilotStatusListener.super.onSsmReceiveTimeout(isTimeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSystemStatus(@NonNull SsmInfo.SsmStatusInf statusInf) {
|
||||
//IMoGoAutopilotStatusListener.super.onSystemStatus(statusInf);
|
||||
|
||||
@@ -49,5 +49,10 @@ class MusicListViewModel : ViewModel(), IOCHTaxiPassengerOrderStatusCallback,
|
||||
}, UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
|
||||
override fun onMusicCompletion(musicData: MusicData) {
|
||||
super.onMusicCompletion(musicData)
|
||||
UiThreadHandler.post({
|
||||
viewCallback?.updateMusicData(musicData, musicData)
|
||||
}, UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
}
|
||||
@@ -47,6 +47,8 @@ class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingVi
|
||||
|
||||
private var animator:ObjectAnimator?=null
|
||||
|
||||
private var isSeekBarTouch = false
|
||||
|
||||
private fun initView() {
|
||||
LayoutInflater.from(context).inflate(R.layout.taxi_p_music_playing, this, true)
|
||||
|
||||
@@ -61,16 +63,24 @@ class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingVi
|
||||
viewModel?.showNextMusic()
|
||||
}
|
||||
sb_musuc_progess.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener{
|
||||
var seekToProgress = 0
|
||||
override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
|
||||
CallerLogger.d(TAG,"progress:${progress}----fromUser:${fromUser}")
|
||||
if(isSeekBarTouch) {
|
||||
CallerLogger.d(TAG, "progress:${progress}----fromUser:${fromUser}")
|
||||
seekToProgress = progress
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStartTrackingTouch(seekBar: SeekBar?) {
|
||||
|
||||
isSeekBarTouch = true
|
||||
}
|
||||
|
||||
override fun onStopTrackingTouch(seekBar: SeekBar?) {
|
||||
|
||||
isSeekBarTouch = false
|
||||
viewModel?.seekTo(seekToProgress)
|
||||
seekToProgress = 0
|
||||
}
|
||||
|
||||
})
|
||||
@@ -127,11 +137,9 @@ class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingVi
|
||||
}
|
||||
|
||||
private fun startAnimal(){
|
||||
animator?.let {
|
||||
if (!it.isRunning) {
|
||||
animator?.start()
|
||||
return
|
||||
}
|
||||
if(animator!=null){
|
||||
animator?.cancel()
|
||||
animator = null
|
||||
}
|
||||
animator = ObjectAnimator.ofFloat(iv_music_cover, "rotation", 0f, 360f)
|
||||
iv_music_cover.pivotX = (iv_music_cover.getWidth() / 2).toFloat()
|
||||
@@ -144,7 +152,8 @@ class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingVi
|
||||
}
|
||||
private fun endAnimal(){
|
||||
if(animator!=null){
|
||||
animator?.pause()
|
||||
animator?.cancel()
|
||||
animator = null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,12 +168,17 @@ class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingVi
|
||||
}
|
||||
|
||||
override fun setProgress(currentPlay: Long, duration: Long) {
|
||||
sb_musuc_progess.max = duration.toInt()
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
sb_musuc_progess.setProgress(currentPlay.toInt(),true)
|
||||
if(isSeekBarTouch){
|
||||
|
||||
}else{
|
||||
sb_musuc_progess.progress=currentPlay.toInt()
|
||||
sb_musuc_progess.max = duration.toInt()
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
sb_musuc_progess.setProgress(currentPlay.toInt(),true)
|
||||
}else{
|
||||
sb_musuc_progess.progress=currentPlay.toInt()
|
||||
}
|
||||
}
|
||||
|
||||
tv_playing_time.text = TimeTransformUtils.stringForTime(currentPlay.toInt())
|
||||
tv_playing_during.text = TimeTransformUtils.stringForTime(duration.toInt())
|
||||
}
|
||||
|
||||
@@ -102,4 +102,8 @@ class MusicPlayingViewModel : ViewModel(), AuditionManager.MusicDataChangeListen
|
||||
showNextMusic()
|
||||
toggle()
|
||||
}
|
||||
|
||||
fun seekTo(progress: Int) {
|
||||
AuditionManager.seekTo(progress)
|
||||
}
|
||||
}
|
||||
BIN
OCH/taxi/passenger/src/main/res/drawable-nodpi/taxt_p_music_bg_relax_bottom.png
Normal file → Executable file
BIN
OCH/taxi/passenger/src/main/res/drawable-nodpi/taxt_p_music_bg_relax_bottom.png
Normal file → Executable file
Binary file not shown.
|
Before Width: | Height: | Size: 235 KiB After Width: | Height: | Size: 50 KiB |
BIN
OCH/taxi/passenger/src/main/res/drawable-nodpi/taxt_p_music_bg_relax_head.png
Normal file → Executable file
BIN
OCH/taxi/passenger/src/main/res/drawable-nodpi/taxt_p_music_bg_relax_head.png
Normal file → Executable file
Binary file not shown.
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 18 KiB |
@@ -171,6 +171,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:clickable="true"
|
||||
android:layout_width="@dimen/dp_746"
|
||||
android:layout_height="@dimen/dp_916"/>
|
||||
|
||||
|
||||
@@ -72,15 +72,17 @@
|
||||
android:progress="50"
|
||||
android:paddingStart="@dimen/dp_0"
|
||||
android:paddingEnd="@dimen/dp_0"
|
||||
android:thumb="@null"
|
||||
android:id="@+id/sb_musuc_progess"
|
||||
android:thumb="@null"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_author"
|
||||
android:layout_marginTop="@dimen/dp_31"
|
||||
android:progressDrawable="@drawable/taxt_p_music_seekbar_style"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingBottom="@dimen/dp_3"
|
||||
android:layout_width="@dimen/dp_340"
|
||||
android:layout_height="@dimen/dp_4"/>
|
||||
android:layout_height="@dimen/dp_10"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_playing_time"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<color name="taxi_p_576887">#576887</color>
|
||||
<color name="taxi_p_995D6A8C">#995D6A8C</color>
|
||||
<color name="taxi_p_B37E90BF">#B37E90BF</color>
|
||||
<color name="taxi_p_488ED0">#488ED0</color>
|
||||
<color name="taxi_p_488ED0">#44488ED0</color>
|
||||
<color name="taxi_p_598CFF">#598CFF</color>
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ import com.mogo.commons.debug.DebugConfig.getNetMode
|
||||
import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.AutopilotMsg
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.cloud.IMoGoCloudListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
@@ -15,6 +18,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
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.scene.SceneConstant.Companion.M_D_C
|
||||
@@ -198,6 +202,48 @@ class MoGoAdasMsgConnectStatusListenerImpl :
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectStatusDescribe = reason
|
||||
CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus()
|
||||
CallerAutoPilotStatusListenerManager.invokeAutoPilotIPCStatusChanged(status, reason)
|
||||
saveIntoMsgBox(status, reason)
|
||||
}
|
||||
|
||||
private fun saveIntoMsgBox(
|
||||
status: AdasConstants.IpcConnectionStatus,
|
||||
reason: String?
|
||||
) {
|
||||
var title = ""
|
||||
var content = ""
|
||||
when (status) {
|
||||
AdasConstants.IpcConnectionStatus.DISCONNECTED -> {
|
||||
title = "连接异常"
|
||||
content = "域控未连接或主动断开连接"
|
||||
}
|
||||
|
||||
AdasConstants.IpcConnectionStatus.CONNECT_EXCEPTION -> {
|
||||
title = "连接异常"
|
||||
content = "域控连接异常:$reason"
|
||||
}
|
||||
|
||||
AdasConstants.IpcConnectionStatus.NOT_FOUND_ADDRESS -> {
|
||||
title = "连接异常"
|
||||
content = "找不到可用的域控地址"
|
||||
}
|
||||
AdasConstants.IpcConnectionStatus.HEARTBEAT_TIMEOUT -> {
|
||||
title = "连接异常"
|
||||
content = "域控心跳超时"
|
||||
}
|
||||
AdasConstants.IpcConnectionStatus.SERVER_DISCONNECTED -> {
|
||||
title = "连接异常"
|
||||
content = "域控主动断开连接"
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
if (title.isNotEmpty() && content.isNotEmpty()) {
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.AUTOPILOT,
|
||||
AutopilotMsg(0, title, content, System.currentTimeMillis())
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCompatibility(versionCompatibility: VersionCompatibility?) {
|
||||
|
||||
@@ -114,6 +114,14 @@ class IPCReportManager : IMoGoAutopilotStatusListener {
|
||||
|| it.code == MogoReport.Code.Info.IVEHICLE.NOT_IN_TROUBLE
|
||||
|| it.code == MogoReport.Code.Info.ILCT.RTK_STATUS_NORMAL
|
||||
){
|
||||
/**
|
||||
* rtk报error后历史信息会一直在消息盒子里,异常恢复后消息会产生误导;
|
||||
* 并且目前有fm和通知栏状态去表示rtk状态,error消息可以删除不显示
|
||||
*/
|
||||
if(it.code == MogoReport.Code.Error.ELCT.RTK_STATUS_FAULT
|
||||
|| it.code == MogoReport.Code.Error.ELCT.RTK_STATUS_UNKNOWN){
|
||||
return@let
|
||||
}
|
||||
val reportEntity = ReportEntity(TimeUtils.millis2String(System.currentTimeMillis()),
|
||||
it.src,it.level,it.msg,it.code,it.resultList,it.actionsList,false)
|
||||
CallerMsgBoxManager.saveMsgBox(MsgBoxBean(MsgBoxType.REPORT, reportEntity))
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.msgbox.AutopilotMsg
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.SSMMsg
|
||||
@@ -217,14 +216,6 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
val listener = it.value
|
||||
listener.onAutopilotIpcConnectStatusChanged(status, reason)
|
||||
}
|
||||
when (status) {
|
||||
AdasConstants.IpcConnectionStatus.DISCONNECTED -> {
|
||||
CallerMsgBoxManager.saveMsgBox(MsgBoxBean(MsgBoxType.AUTOPILOT, AutopilotMsg(0, "连接异常", "域控未连接或主动断开连接", System.currentTimeMillis())))
|
||||
}
|
||||
AdasConstants.IpcConnectionStatus.CONNECT_EXCEPTION -> {
|
||||
CallerMsgBoxManager.saveMsgBox(MsgBoxBean(MsgBoxType.AUTOPILOT, AutopilotMsg(0, "连接异常", "域控连接异常:$reason", System.currentTimeMillis())))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user