增加判断,修复偶现window初始值为0的情况
This commit is contained in:
xuxinchao
2022-07-21 16:59:04 +08:00
parent e891bcf906
commit dbd71ee4a2
3 changed files with 9 additions and 2 deletions

View File

@@ -101,7 +101,9 @@ class AIDataCollectWindow constructor(activity: Activity) : View.OnTouchListener
tvCollectReport = mFloatLayout.findViewById(R.id.tvCollectReport)
tvCollectCancel = mFloatLayout.findViewById(R.id.tvCollectCancel)
if(BadCaseConfig.windowNum<1){
BadCaseConfig.windowNum = 1
}
tvCollectNum.text = BadCaseConfig.windowNum.toString()
BadCaseConfig.windowNum++
tvCollectTime.text ="时间:${millis2String(System.currentTimeMillis(),TimeUtils.getHourMinSecondFormat())}"

View File

@@ -121,7 +121,9 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
tvInitiativeReport = mFloatLayout.findViewById(R.id.tvInitiativeReport)
tvInitiativeCancel = mFloatLayout.findViewById(R.id.tvInitiativeCancel)
if(BadCaseConfig.windowNum<1){
BadCaseConfig.windowNum = 1
}
tvInitiativeNum.text = BadCaseConfig.windowNum.toString()
BadCaseConfig.windowNum++
tvInitiativeTime.text = "时间:${millis2String(System.currentTimeMillis(),TimeUtils.getHourMinSecondFormat())}"

View File

@@ -107,6 +107,9 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
tvPassiveReport = mFloatLayout.findViewById(R.id.tvPassiveReport)
tvPassiveCancel = mFloatLayout.findViewById(R.id.tvPassiveCancel)
flReasonLayout = mFloatLayout.findViewById(R.id.flReasonLayout)
if(BadCaseConfig.windowNum<1){
BadCaseConfig.windowNum = 1
}
tvPassiveNum.text = BadCaseConfig.windowNum.toString()
BadCaseConfig.windowNum++
tvPassiveTime.text = "时间:${millis2String(System.currentTimeMillis(),TimeUtils.getHourMinSecondFormat())}"