From e0ea7772499352261b711e25f0e133412cf1b983 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Sun, 7 Nov 2021 19:43:34 +0800 Subject: [PATCH] Use `ProcessCompat` Fix #4895 --- .../main/java/com/topjohnwu/magisk/ui/deny/AppProcessInfo.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/deny/AppProcessInfo.kt b/app/src/main/java/com/topjohnwu/magisk/ui/deny/AppProcessInfo.kt index be9d24772..3a3112b41 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/deny/AppProcessInfo.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/deny/AppProcessInfo.kt @@ -8,7 +8,7 @@ import android.content.pm.PackageManager.* import android.content.pm.ServiceInfo import android.graphics.drawable.Drawable import android.os.Build.VERSION.SDK_INT -import android.os.Process +import androidx.core.os.ProcessCompat import com.topjohnwu.magisk.core.utils.currentLocale import com.topjohnwu.magisk.ktx.getLabel import java.util.* @@ -46,7 +46,7 @@ class AppProcessInfo( fun isSystemApp() = info.flags and ApplicationInfo.FLAG_SYSTEM != 0 - fun isApp() = Process.isApplicationUid(info.uid) + fun isApp() = ProcessCompat.isApplicationUid(info.uid) private fun createProcess(name: String, pkg: String = info.packageName) = ProcessInfo(name, pkg, denyList.any { it.process == name && it.packageName == pkg })