|
|
|
|
@@ -7,25 +7,18 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
|
import com.mogo.commons.debug.DebugConfig
|
|
|
|
|
import com.mogo.commons.storage.SharedPrefsMgr
|
|
|
|
|
import com.mogo.eagle.core.data.app.AppConfigInfo
|
|
|
|
|
import com.mogo.eagle.core.data.enums.Carmodel
|
|
|
|
|
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
|
|
|
|
|
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
|
|
|
|
import com.mogo.eagle.core.function.api.datacenter.IDataCenterBizListener
|
|
|
|
|
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
|
|
|
|
|
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
|
|
|
|
import com.mogo.eagle.core.function.api.hmi.autopilot.IMoGoCheckAutoPilotBtnListener
|
|
|
|
|
import com.mogo.eagle.core.function.api.och.IOchFunctionCallNotify
|
|
|
|
|
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.datacenter.CallerDataCenterBizListener
|
|
|
|
|
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
|
|
|
|
import com.mogo.eagle.core.function.hmi.R
|
|
|
|
|
import com.mogo.eagle.core.function.hmi.bone.BoneTabLayout
|
|
|
|
|
import com.mogo.eagle.core.function.hmi.ui.tools.OfflineMapDialog
|
|
|
|
|
import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog
|
|
|
|
|
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
|
|
|
|
@@ -36,7 +29,6 @@ import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
|
|
|
|
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
|
|
|
|
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
|
|
|
|
import com.mogo.map.MogoData
|
|
|
|
|
import kotlinx.android.synthetic.main.view_bone_container.view.clBoneTab
|
|
|
|
|
import kotlinx.android.synthetic.main.view_car_info_tab.view.ivCarType
|
|
|
|
|
import kotlinx.android.synthetic.main.view_car_info_tab.view.tvADMapVersion
|
|
|
|
|
import kotlinx.android.synthetic.main.view_car_info_tab.view.tvADVersionName
|
|
|
|
|
@@ -48,13 +40,13 @@ import kotlinx.android.synthetic.main.view_car_info_tab.view.tvHDMapVersion
|
|
|
|
|
import kotlinx.android.synthetic.main.view_car_info_tab.view.tvPADUpdate
|
|
|
|
|
import kotlinx.android.synthetic.main.view_car_info_tab.view.tvPadVersion
|
|
|
|
|
import kotlinx.android.synthetic.main.view_car_info_tab.view.tvSnInfo
|
|
|
|
|
import mogo.telematics.pad.MessagePad
|
|
|
|
|
import system_master.SsmInfo
|
|
|
|
|
import system_master.SystemStatusInfo
|
|
|
|
|
|
|
|
|
|
private fun String.parsePlateNo(): String {
|
|
|
|
|
return " " + substring(0, 2) + " " + substring(2) + " "
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun String.parsePhoneNo(): String {
|
|
|
|
|
return take(3) + "****" + takeLast(4)
|
|
|
|
|
}
|
|
|
|
|
@@ -131,7 +123,7 @@ class CarInfoTabView @JvmOverloads constructor(
|
|
|
|
|
if (isHDCached) { // 已缓存
|
|
|
|
|
ToastUtils.showShort(resources.getString(R.string.offline_had_downloaded))
|
|
|
|
|
} else {// 未缓存
|
|
|
|
|
if(!NetworkUtils.isConnected(context)){
|
|
|
|
|
if (!NetworkUtils.isConnected(context)) {
|
|
|
|
|
ToastUtils.showShort(resources.getString(R.string.offline_update_tip))
|
|
|
|
|
return@setOnClickListener
|
|
|
|
|
}
|
|
|
|
|
@@ -156,6 +148,15 @@ class CarInfoTabView @JvmOverloads constructor(
|
|
|
|
|
tvPadVersion.text = tvPadVersion.text.toString() + AppUtils.getAppVersionName()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun invokeLoginNo(loginNo: String?) {
|
|
|
|
|
super.invokeLoginNo(loginNo)
|
|
|
|
|
UiThreadHandler.post {
|
|
|
|
|
loginNo?.let {
|
|
|
|
|
tvCarLoginInfo.text = it
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun invokeCarRes(res: Int) {
|
|
|
|
|
super.invokeCarRes(res)
|
|
|
|
|
UiThreadHandler.post {
|
|
|
|
|
|