[6.7.0]增加主动查询冷启动状态
This commit is contained in:
@@ -14,6 +14,7 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
|||||||
import androidx.core.content.ContextCompat
|
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.api.autopilot.IMoGoColdStartStateListener
|
||||||
|
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.autopilot.CallerColdStartStateListenerManager
|
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
|
||||||
@@ -84,6 +85,7 @@ class ColdStartView @JvmOverloads constructor(
|
|||||||
super.onAttachedToWindow()
|
super.onAttachedToWindow()
|
||||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||||
CallerColdStartStateListenerManager.addListener(TAG,this)
|
CallerColdStartStateListenerManager.addListener(TAG,this)
|
||||||
|
CallerAutoPilotControlManager.sendSsmFuncQueryColdStartState()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDetachedFromWindow() {
|
override fun onDetachedFromWindow() {
|
||||||
@@ -319,6 +321,8 @@ class ColdStartView @JvmOverloads constructor(
|
|||||||
viewColdStartDivider.visibility = View.GONE
|
viewColdStartDivider.visibility = View.GONE
|
||||||
ivColdStartStatus.visibility = View.GONE
|
ivColdStartStatus.visibility = View.GONE
|
||||||
tvColdStartContent.visibility = View.GONE
|
tvColdStartContent.visibility = View.GONE
|
||||||
|
//主动查询冷启动状态
|
||||||
|
CallerAutoPilotControlManager.sendSsmFuncQueryColdStartState()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -377,6 +381,8 @@ class ColdStartView @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
ssmConnectStatus = true
|
ssmConnectStatus = true
|
||||||
coldStartStatus = false
|
coldStartStatus = false
|
||||||
|
//主动查询冷启动状态
|
||||||
|
CallerAutoPilotControlManager.sendSsmFuncQueryColdStartState()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -494,10 +500,13 @@ class ColdStartView @JvmOverloads constructor(
|
|||||||
* 隐藏冷启动视图
|
* 隐藏冷启动视图
|
||||||
*/
|
*/
|
||||||
private fun hideColdStartView(){
|
private fun hideColdStartView(){
|
||||||
UiThreadHandler.postDelayed({
|
// UiThreadHandler.postDelayed({
|
||||||
this@ColdStartView.visibility = View.GONE
|
// this@ColdStartView.visibility = View.GONE
|
||||||
coldStartResultListener?.coldStartSuccess()
|
// coldStartResultListener?.coldStartSuccess()
|
||||||
}, 2000)
|
// }, 2000)
|
||||||
|
// 假设view是你想要淡出的视图
|
||||||
|
this@ColdStartView.animate().alpha(0.0f).setDuration(1000).start()
|
||||||
|
coldStartResultListener?.coldStartSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user