[6.9.0]OTA镜像下载进度为100%时显示部署中

This commit is contained in:
xuxinchao
2025-01-08 11:39:00 +08:00
parent a05f71526b
commit f4ec917767

View File

@@ -33,6 +33,9 @@ class OTADownloadStatusAdapter(private val context: Context): RecyclerView.Adapt
val otaUpgradeInfo = it[position]
holder.tvProductName.text = otaUpgradeInfo.product_name
holder.tvDownloadProgress.text = "${(otaUpgradeInfo.cur_size*100/otaUpgradeInfo.total_size).toInt()}%"
if(otaUpgradeInfo.cur_size == otaUpgradeInfo.total_size){
holder.tvDownloadProgress.text = "部署中"
}
holder.pbDownloadProgress.progress = (otaUpgradeInfo.cur_size*100/otaUpgradeInfo.total_size).toInt()
// 0:默认(未开始), 1:下载中, 2:下载完成, 3:升级完成, 4:升级失败
// holder.tvDownloadStatus.text = when (otaUpgradeInfo.status) {