Fix isolated process comparisons

This commit is contained in:
vvb2060 2021-12-05 17:41:50 +08:00 committed by John Wu
parent 94cc64c51b
commit b76a3614da

View File

@ -85,7 +85,7 @@ class AppProcessInfo(
pm.getPackageArchiveInfo(info.sourceDir, flag) ?: return emptyList() pm.getPackageArchiveInfo(info.sourceDir, flag) ?: return emptyList()
} }
val processSet = TreeSet<ProcessInfo>(compareBy{ it.name }) val processSet = TreeSet<ProcessInfo>(compareBy({ it.name }, { it.isIsolated }))
processSet += packageInfo.activities.toProcessList() processSet += packageInfo.activities.toProcessList()
processSet += packageInfo.services.toProcessList() processSet += packageInfo.services.toProcessList()
processSet += packageInfo.receivers.toProcessList() processSet += packageInfo.receivers.toProcessList()
@ -106,6 +106,6 @@ data class ProcessInfo(
val packageName: String, val packageName: String,
var isEnabled: Boolean var isEnabled: Boolean
) { ) {
val isIsolated get() = packageName == ISOLATED_MAGIC val isIsolated = packageName == ISOLATED_MAGIC
val isAppZygote get() = name.endsWith("_zygote") val isAppZygote = name.endsWith("_zygote")
} }