mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 02:25:28 +00:00
parent
4c1962f3c7
commit
e0ea777249
@ -8,7 +8,7 @@ import android.content.pm.PackageManager.*
|
|||||||
import android.content.pm.ServiceInfo
|
import android.content.pm.ServiceInfo
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.os.Build.VERSION.SDK_INT
|
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.core.utils.currentLocale
|
||||||
import com.topjohnwu.magisk.ktx.getLabel
|
import com.topjohnwu.magisk.ktx.getLabel
|
||||||
import java.util.*
|
import java.util.*
|
||||||
@ -46,7 +46,7 @@ class AppProcessInfo(
|
|||||||
|
|
||||||
fun isSystemApp() = info.flags and ApplicationInfo.FLAG_SYSTEM != 0
|
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) =
|
private fun createProcess(name: String, pkg: String = info.packageName) =
|
||||||
ProcessInfo(name, pkg, denyList.any { it.process == name && it.packageName == pkg })
|
ProcessInfo(name, pkg, denyList.any { it.process == name && it.packageName == pkg })
|
||||||
|
Loading…
Reference in New Issue
Block a user