[6.10.0]数据落盘修改
This commit is contained in:
@@ -395,6 +395,8 @@ class DiskCopyView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerDiskCopyManager.addListener(TAG, this)
|
||||
//硬盘挂载状态查询
|
||||
CallerAutoPilotControlManager.sendCopyBagDiskStatus()
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
@@ -418,7 +420,8 @@ class DiskCopyView @JvmOverloads constructor(
|
||||
}
|
||||
//挂载异常
|
||||
1->{
|
||||
//TODO
|
||||
//隐藏数据落盘辅助工具视图
|
||||
this@DiskCopyView.visibility = View.GONE
|
||||
}
|
||||
//未挂载
|
||||
2->{
|
||||
@@ -449,11 +452,13 @@ class DiskCopyView @JvmOverloads constructor(
|
||||
Logger.i(TAG,"磁盘剩余空间="+diskCopy.mountSuccess.diskFree)
|
||||
//磁盘剩余空间显示
|
||||
tvDiskFreeSpace.text = String.format(resources.getString(R.string.disk_free_space),diskCopy.mountSuccess.diskFree)
|
||||
val diskUsedPercent = ((diskCopy.mountSuccess.totalSize-diskCopy.mountSuccess.diskFree)*100/diskCopy.mountSuccess.totalSize).toInt()
|
||||
//磁盘已用空间百分比文字显示
|
||||
tvDiskUsedPercent.text = String.format(resources.getString(R.string.disk_used_percent),diskUsedPercent)
|
||||
//磁盘已用空间百分比进度条
|
||||
pbDiskUsedSpaces.progress = diskUsedPercent
|
||||
if(diskCopy.mountSuccess.totalSize > 0){
|
||||
val diskUsedPercent = ((diskCopy.mountSuccess.totalSize-diskCopy.mountSuccess.diskFree)*100/diskCopy.mountSuccess.totalSize).toInt()
|
||||
//磁盘已用空间百分比文字显示
|
||||
tvDiskUsedPercent.text = String.format(resources.getString(R.string.disk_used_percent),diskUsedPercent)
|
||||
//磁盘已用空间百分比进度条
|
||||
pbDiskUsedSpaces.progress = diskUsedPercent
|
||||
}
|
||||
Logger.i(TAG,"可拷贝日期数量="+diskCopy.mountSuccess.datesCount)
|
||||
diskCopy.mountSuccess.datesList.forEach {
|
||||
Logger.i(TAG, "可拷贝日期=$it")
|
||||
@@ -509,6 +514,8 @@ class DiskCopyView @JvmOverloads constructor(
|
||||
Logger.i(TAG,"硬盘是否已安全弹出,是-True,否-False="+diskCopy.diskUnmount)
|
||||
if(diskCopy.diskUnmount){
|
||||
ToastUtils.showShort("硬盘已安全弹出")
|
||||
//隐藏数据落盘辅助工具视图
|
||||
this@DiskCopyView.visibility = View.GONE
|
||||
}
|
||||
//硬盘弹出失败提示:安全弹出失败,建议车辆下电后拔走硬盘
|
||||
Logger.i(TAG,"硬盘弹出失败提示="+diskCopy.unmountErr)
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_45"
|
||||
android:gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -42,6 +43,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_45"
|
||||
android:gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -44,6 +45,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
||||
Reference in New Issue
Block a user