mirror of
https://github.com/KitsunePie/AppErrorsTracking.git
synced 2025-09-06 03:05:17 +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 } }
|
.filter { it.packageName.let { e -> e != "android" && e != BuildConfig.APPLICATION_ID } }
|
||||||
.let { info ->
|
.let { info ->
|
||||||
arrayListOf<AppInfoBean>().apply {
|
arrayListOf<AppInfoBean>().apply {
|
||||||
|
if (info.isNotEmpty())
|
||||||
(if (filters.name.isNotBlank()) info.filter {
|
(if (filters.name.isNotBlank()) info.filter {
|
||||||
it.packageName.contains(filters.name) || context.appNameOf(it.packageName).contains(filters.name)
|
it.packageName.contains(filters.name) || context.appNameOf(it.packageName).contains(filters.name)
|
||||||
} else info).let { result ->
|
} else info).let { result ->
|
||||||
@@ -259,7 +260,8 @@ object FrameworkHooker : YukiBaseHooker() {
|
|||||||
}
|
}
|
||||||
}.sortedByDescending { it.lastUpdateTime }
|
}.sortedByDescending { it.lastUpdateTime }
|
||||||
.forEach { add(AppInfoBean(name = context.appNameOf(it.packageName), packageName = it.packageName)) }
|
.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()
|
} ?: arrayListOf()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user