mirror of
https://github.com/KitsunePie/AppErrorsTracking.git
synced 2025-09-01 08:45:16 +08:00
Modify change empty mark for AppErrorsInfoBean in AppErrorsInfoBean, FrameworkHooker
This commit is contained in:
@@ -63,12 +63,6 @@ data class AppErrorsInfoBean(
|
||||
|
||||
companion object {
|
||||
|
||||
/**
|
||||
* 创建一个空的 [AppErrorsInfoBean]
|
||||
* @return [AppErrorsInfoBean]
|
||||
*/
|
||||
fun createEmpty() = AppErrorsInfoBean().apply { isEmpty = true }
|
||||
|
||||
/**
|
||||
* 从 [ApplicationErrorReport.CrashInfo] 克隆
|
||||
* @param pid APP 进程 ID
|
||||
@@ -101,8 +95,11 @@ data class AppErrorsInfoBean(
|
||||
}
|
||||
}
|
||||
|
||||
/** 标识当前内容是否为空 */
|
||||
var isEmpty = false
|
||||
/**
|
||||
* 获取当前内容是否为空
|
||||
* @return [Boolean]
|
||||
*/
|
||||
val isEmpty get() = pid == -1 && userId == -1 && timestamp == -1L
|
||||
|
||||
/**
|
||||
* 获取生成的 Json 文件名
|
||||
|
@@ -186,7 +186,7 @@ object FrameworkHooker : YukiBaseHooker() {
|
||||
onPushAppErrorInfoData {
|
||||
AppErrorsRecordData.allData.firstOrNull { e -> e.pid == it } ?: run {
|
||||
loggerW(msg = "Cannot received crash application data --pid $it")
|
||||
AppErrorsInfoBean.createEmpty()
|
||||
AppErrorsInfoBean()
|
||||
}
|
||||
}
|
||||
onPushAppErrorsInfoData { AppErrorsRecordData.allData.toArrayList() }
|
||||
|
Reference in New Issue
Block a user