调试窗
修复NumberFormatException异常
This commit is contained in:
@@ -1073,13 +1073,19 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
if (logTimeStr.isNullOrEmpty()) {
|
||||
logTimeStr = "10"
|
||||
}
|
||||
val logCatchTime = logTimeStr.toInt()
|
||||
if (logCatchTime > 60) {
|
||||
tbLogCatch.isChecked = false
|
||||
TipToast.shortTip("最长抓取时间为60分钟")
|
||||
return@setOnCheckedChangeListener
|
||||
try{
|
||||
val logCatchTime = logTimeStr.toInt()
|
||||
if (logCatchTime > 60) {
|
||||
tbLogCatch.isChecked = false
|
||||
TipToast.shortTip("最长抓取时间为60分钟")
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
CallerDevaToolsManager.startCatchLog(logCatchTime)
|
||||
}catch (e: Exception){
|
||||
ToastUtils.showLong("输入格式错误,请重新输入正确时间数字,最长抓取时间为60分钟")
|
||||
etLogCatch.setText("")
|
||||
}
|
||||
CallerDevaToolsManager.startCatchLog(logCatchTime)
|
||||
|
||||
} else {
|
||||
CallerDevaToolsManager.stopCatchLog()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user