mirror of
https://github.com/KitsunePie/AppErrorsTracking.git
synced 2025-09-04 02:05:16 +08:00
Modify change the judgment logic when fetched installed packages list is empty in FrameworkHooker
This commit is contained in:
@@ -244,6 +244,7 @@ object FrameworkHooker : YukiBaseHooker() {
|
||||
.filter { it.packageName.let { e -> e != "android" && e != BuildConfig.APPLICATION_ID } }
|
||||
.let { info ->
|
||||
arrayListOf<AppInfoBean>().apply {
|
||||
if (info.isNotEmpty())
|
||||
(if (filters.name.isNotBlank()) info.filter {
|
||||
it.packageName.contains(filters.name) || context.appNameOf(it.packageName).contains(filters.name)
|
||||
} else info).let { result ->
|
||||
@@ -259,7 +260,8 @@ object FrameworkHooker : YukiBaseHooker() {
|
||||
}
|
||||
}.sortedByDescending { it.lastUpdateTime }
|
||||
.forEach { add(AppInfoBean(name = context.appNameOf(it.packageName), packageName = it.packageName)) }
|
||||
}.apply { if (size <= 0) loggerW(msg = "Fetched installed packages but got empty list") }
|
||||
else loggerW(msg = "Fetched installed packages but got empty list")
|
||||
}
|
||||
}
|
||||
} ?: arrayListOf()
|
||||
}
|
||||
|
Reference in New Issue
Block a user