Handle unexpected exceptions

Fix #3276
This commit is contained in:
topjohnwu 2020-10-22 03:09:05 -07:00
parent 533cb8eb58
commit 0d11f73a1d

View File

@ -67,7 +67,8 @@ class HideViewModel : BaseViewModel(), Queryable {
.asSequence() .asSequence()
.filter { it.enabled && !blacklist.contains(it.packageName) } .filter { it.enabled && !blacklist.contains(it.packageName) }
.map { HideAppInfo(it, pm) } .map { HideAppInfo(it, pm) }
.map { createTarget(it, hides) } .map { runCatching { createTarget(it, hides) }.getOrNull() }
.filterNotNull()
.filter { it.processes.isNotEmpty() } .filter { it.processes.isNotEmpty() }
.map { HideItem(it) } .map { HideItem(it) }
.toList() .toList()