Apply binder scope to PlatformCompatHook
This commit is contained in:
parent
229743bb7f
commit
0a82211745
1 changed files with 4 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import com.github.kyuubiran.ezxhelper.utils.hookBefore
|
|||
import de.robv.android.xposed.XC_MethodHook
|
||||
import icu.nullptr.hidemyapplist.common.CommonUtils
|
||||
import icu.nullptr.hidemyapplist.xposed.HMAService
|
||||
import icu.nullptr.hidemyapplist.xposed.Utils
|
||||
import icu.nullptr.hidemyapplist.xposed.logE
|
||||
import icu.nullptr.hidemyapplist.xposed.logI
|
||||
|
||||
|
|
@ -32,7 +33,9 @@ class PlatformCompatHook(private val service: HMAService) : IFrameworkHook {
|
|||
val changeId = param.args[0] as Long
|
||||
val appInfo = param.args[1] as ApplicationInfo
|
||||
if (changeId.toInt() != 143937733) return@hookBefore
|
||||
val apps = service.pms.getPackagesForUid(appInfo.uid) ?: return@hookBefore
|
||||
val apps = Utils.binderLocalScope {
|
||||
service.pms.getPackagesForUid(appInfo.uid)
|
||||
} ?: return@hookBefore
|
||||
for (app in apps) {
|
||||
if (service.isHookEnabled(app)) {
|
||||
if (sAppDataIsolationEnabled) param.result = true
|
||||
|
|
|
|||
Loading…
Reference in a new issue