[6.2.0]被动录包如页面有操作则不会自动消失
This commit is contained in:
@@ -180,8 +180,11 @@ internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordLis
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
passiveBadCaseWindow.hideFloatWindow()
|
||||
BadCaseConfig.windowNum--
|
||||
//如果有页面操作,则不自动关闭窗口
|
||||
if(!passiveBadCaseWindow.isOperated()){
|
||||
passiveBadCaseWindow.hideFloatWindow()
|
||||
BadCaseConfig.windowNum--
|
||||
}
|
||||
}
|
||||
}
|
||||
countDownTimer.start()
|
||||
|
||||
@@ -93,6 +93,8 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
private var stat: String = ""
|
||||
private var boxBean: MsgBoxBean ?= null
|
||||
|
||||
private var hasOperated: Boolean = false //是否有页面操作
|
||||
|
||||
private lateinit var rvPassiveList : RecyclerView
|
||||
private var badReasonListAdapter: BadReasonListAdapter?= null
|
||||
|
||||
@@ -159,6 +161,7 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
badReasonListAdapter = BadReasonListAdapter(mActivity)
|
||||
badReasonListAdapter?.setListener(object: BadReasonListAdapter.ReasonClickListener{
|
||||
override fun onClick(reason: String, isChecked: Boolean) {
|
||||
hasOperated = true
|
||||
if(isChecked){
|
||||
uploadReason.append(reason)
|
||||
}else{
|
||||
@@ -172,8 +175,8 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
/**
|
||||
* 获取录包原因数据
|
||||
*/
|
||||
// BadCaseNetManager.badCaseNetManager.getRecordOption(1,AppConfigInfo.iPCMacAddress)
|
||||
BadCaseNetManager.badCaseNetManager.getRecordOption(2,"48:b0:2d:3a:9c:8f")
|
||||
BadCaseNetManager.badCaseNetManager.getRecordOption(2,AppConfigInfo.iPCMacAddress)
|
||||
// BadCaseNetManager.badCaseNetManager.getRecordOption(2,"48:b0:2d:3a:9c:8f")
|
||||
CallerDevaToolsNetManager.addListener(this.hashCode().toString(),this)
|
||||
if(BadCaseConfig.windowNum<1){
|
||||
BadCaseConfig.windowNum = 1
|
||||
@@ -185,9 +188,11 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
viewAudioBg.setOnClickListener {
|
||||
audioStatus = !audioStatus
|
||||
setAudio(audioStatus)
|
||||
hasOperated = true
|
||||
}
|
||||
|
||||
tvPassiveReport.setOnClickListener {
|
||||
hasOperated = true
|
||||
if(uploadReason.isEmpty()){
|
||||
TipToast.shortTip("请选择至少一个Case")
|
||||
return@setOnClickListener
|
||||
@@ -207,6 +212,7 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
}
|
||||
|
||||
tvPassiveCancel.setOnClickListener {
|
||||
hasOperated = true
|
||||
BadCaseConfig.windowNum--
|
||||
clickListener?.closeWindow()
|
||||
//删除记录
|
||||
@@ -473,6 +479,7 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
|
||||
}
|
||||
MotionEvent.ACTION_MOVE -> {
|
||||
hasOperated = true
|
||||
// 更新浮动窗口位置参数
|
||||
mInScreenX = motionEvent.rawX
|
||||
// mInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight()
|
||||
@@ -507,6 +514,13 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
if (mFloatLayout.parent != null) mWindowManager!!.removeView(mFloatLayout)
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面是否有操作
|
||||
*/
|
||||
fun isOperated(): Boolean{
|
||||
return hasOperated
|
||||
}
|
||||
|
||||
fun setRecord(msgBoxBean: MsgBoxBean){
|
||||
boxBean = msgBoxBean
|
||||
val recordBagMsg = (msgBoxBean.bean as RecordBagMsg)
|
||||
|
||||
Reference in New Issue
Block a user