mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 07:57:39 +00:00
Fix isolated process display
This commit is contained in:
parent
8b5cb4c7b0
commit
d11358671e
@ -60,7 +60,7 @@ class HideAppInfo(info: ApplicationInfo, pm: PackageManager, hideList: List<Cmdl
|
||||
|
||||
val hidden = hideList.filter { it.packageName == packageName || it.packageName == ISOLATED_MAGIC }
|
||||
fun createProcess(name: String, pkg: String = packageName): HideProcessInfo {
|
||||
return HideProcessInfo(name, pkg, hidden.any { it.process == name })
|
||||
return HideProcessInfo(name, pkg, hidden.any { it.process == name && it.packageName == pkg })
|
||||
}
|
||||
|
||||
var haveAppZygote = false
|
||||
@ -86,7 +86,7 @@ class HideAppInfo(info: ApplicationInfo, pm: PackageManager, hideList: List<Cmdl
|
||||
receivers?.processes().orEmpty() +
|
||||
providers?.processes().orEmpty() +
|
||||
listOf(if (haveAppZygote) createProcess("${processName}_zygote") else null)
|
||||
}.filterNotNull().distinctBy { it.name }.sortedBy { it.name }
|
||||
}.filterNotNull().distinct().sortedBy { it.name }
|
||||
}
|
||||
|
||||
companion object {
|
||||
@ -102,6 +102,6 @@ data class HideProcessInfo(
|
||||
val packageName: String,
|
||||
var isHidden: Boolean
|
||||
) {
|
||||
val isIsolated get() = name == ISOLATED_MAGIC
|
||||
val isIsolated get() = packageName == ISOLATED_MAGIC
|
||||
val isAppZygote get() = name.endsWith("_zygote")
|
||||
}
|
||||
|
@ -93,6 +93,8 @@ class HideProcessRvItem(
|
||||
|
||||
override val layoutRes get() = R.layout.item_hide_process_md2
|
||||
|
||||
val displayName = if (process.isIsolated) "(isolated) ${process.name}" else process.name
|
||||
|
||||
@get:Bindable
|
||||
var isHidden
|
||||
get() = process.isHidden
|
||||
@ -109,7 +111,10 @@ class HideProcessRvItem(
|
||||
val defaultSelection get() =
|
||||
process.isIsolated || process.isAppZygote || process.name == process.packageName
|
||||
|
||||
override fun contentSameAs(other: HideProcessRvItem) = process == other.process
|
||||
override fun itemSameAs(other: HideProcessRvItem) = process.name == other.process.name
|
||||
override fun contentSameAs(other: HideProcessRvItem) =
|
||||
process.isHidden == other.process.isHidden
|
||||
|
||||
override fun itemSameAs(other: HideProcessRvItem) =
|
||||
process.name == other.process.name && process.packageName == other.process.packageName
|
||||
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
android:layout_marginBottom="@dimen/l_75"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="middle"
|
||||
android:text="@{item.process.name}"
|
||||
android:text="@{item.displayName}"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/hide_process_checkbox"
|
||||
|
Loading…
x
Reference in New Issue
Block a user