[6.4.0]
[修复可能为null来判断]
This commit is contained in:
@@ -58,20 +58,32 @@ object LoginLanDriverSocket : ILoginCallback {
|
||||
|
||||
// 司机端发送业务模式更改和环境校验
|
||||
override fun onStatusChange(currentStatus: LoginStatusEnum?) {
|
||||
when (currentStatus) {
|
||||
LoginStatusEnum.Login -> {
|
||||
FlavorUtils.getEnvCheck()
|
||||
val msg =
|
||||
ChangeBusinessType(FlavorUtils.vehicleType!!, FlavorUtils.businessType!!, FlavorUtils.projectType!!, FlavorUtils.envType!!)
|
||||
LanSocketManager.sendMsgToClient(msg)
|
||||
BizLoopManager.setLoopFunction(TAG, LoopInfo(60, ::loopCheck))
|
||||
}
|
||||
if (FlavorUtils.vehicleType != null && FlavorUtils.projectType != null && FlavorUtils.envType != null) {
|
||||
when (currentStatus) {
|
||||
LoginStatusEnum.Login -> {
|
||||
FlavorUtils.getEnvCheck()
|
||||
val msg =
|
||||
ChangeBusinessType(
|
||||
FlavorUtils.vehicleType!!,
|
||||
FlavorUtils.businessType!!,
|
||||
FlavorUtils.projectType!!,
|
||||
FlavorUtils.envType!!
|
||||
)
|
||||
LanSocketManager.sendMsgToClient(msg)
|
||||
BizLoopManager.setLoopFunction(TAG, LoopInfo(60, ::loopCheck))
|
||||
}
|
||||
|
||||
else -> {
|
||||
BizLoopManager.removeLoopFunction(TAG)
|
||||
val msg =
|
||||
ChangeBusinessType(FlavorUtils.vehicleType!!, BusinessType.none, FlavorUtils.projectType!!, FlavorUtils.envType!!)
|
||||
LanSocketManager.sendMsgToClient(msg)
|
||||
else -> {
|
||||
BizLoopManager.removeLoopFunction(TAG)
|
||||
val msg =
|
||||
ChangeBusinessType(
|
||||
FlavorUtils.vehicleType!!,
|
||||
BusinessType.none,
|
||||
FlavorUtils.projectType!!,
|
||||
FlavorUtils.envType!!
|
||||
)
|
||||
LanSocketManager.sendMsgToClient(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user