From fd552e68a9b3a5056dbe9abd4566dff78cdb3558 Mon Sep 17 00:00:00 2001 From: vvb2060 Date: Thu, 24 Sep 2020 04:55:40 +0800 Subject: [PATCH] Don't hide app with uid < 10000 --- .../main/java/com/topjohnwu/magisk/ui/hide/HideViewModel.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/hide/HideViewModel.kt b/app/src/main/java/com/topjohnwu/magisk/ui/hide/HideViewModel.kt index 02a090dce..7264f913e 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/hide/HideViewModel.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/hide/HideViewModel.kt @@ -57,7 +57,7 @@ class HideViewModel : BaseViewModel(), Queryable { val hides = Shell.su("magiskhide --ls").exec().out.map { HideTarget(it) } val apps = pm.getInstalledApplications(0) .asSequence() - .filter { it.enabled && !blacklist.contains(it.packageName) } + .filter { it.enabled && it.uid >= 10000 && !blacklist.contains(it.packageName) } .map { HideAppInfo(it, pm) } .map { createTarget(it, hides) } .filter { it.processes.isNotEmpty() } @@ -112,7 +112,6 @@ class HideViewModel : BaseViewModel(), Queryable { companion object { private val blacklist by lazy { listOf( packageName, - "android", "com.android.chrome", "com.chrome.beta", "com.chrome.dev",