[6.1.0][Opt]去掉冗余的代码
This commit is contained in:
@@ -123,36 +123,30 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
super.onAutopilotStatusResponse(state)
|
||||
when (state) {
|
||||
7 -> {
|
||||
if (this.autopilotState != 7) {
|
||||
isAutoDriving = false
|
||||
Log.d(TAG, "onAutopilotStatusResponse-7")
|
||||
isAutoDriving = false
|
||||
Log.d(TAG, "onAutopilotStatusResponse-7")
|
||||
ThreadUtils.runOnUiThread({
|
||||
updateUI(PARALLEL_DRIVING)
|
||||
}, ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
|
||||
2 -> {
|
||||
isAutoDriving = true
|
||||
Log.d(TAG, "onAutopilotStatusResponse-2")
|
||||
if (this.autopilotState == 7) {
|
||||
ThreadUtils.runOnUiThread({
|
||||
updateUI(PARALLEL_DRIVING)
|
||||
checkAvailableAndUpdateUI()
|
||||
}, ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
}
|
||||
|
||||
2 -> {
|
||||
if (this.autopilotState != state) {
|
||||
isAutoDriving = true
|
||||
Log.d(TAG, "onAutopilotStatusResponse-2")
|
||||
if (this.autopilotState == 7) {
|
||||
ThreadUtils.runOnUiThread({
|
||||
checkAvailableAndUpdateUI()
|
||||
}, ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else -> {
|
||||
if (this.autopilotState != state) {
|
||||
isAutoDriving = false
|
||||
Log.d(TAG, "onAutopilotStatusResponse-else")
|
||||
if (this.autopilotState == 7) {
|
||||
ThreadUtils.runOnUiThread({
|
||||
checkAvailableAndUpdateUI()
|
||||
}, ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
isAutoDriving = false
|
||||
Log.d(TAG, "onAutopilotStatusResponse-else")
|
||||
if (this.autopilotState == 7) {
|
||||
ThreadUtils.runOnUiThread({
|
||||
checkAvailableAndUpdateUI()
|
||||
}, ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user