mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 09:45:19 +08:00
Modify add try catch on findUserId function in AppParasitics
This commit is contained in:
@@ -122,11 +122,12 @@ internal object AppParasitics {
|
||||
* @param packageName 当前包名
|
||||
* @return [Int]
|
||||
*/
|
||||
internal fun findUserId(packageName: String) =
|
||||
internal fun findUserId(packageName: String) = runCatching {
|
||||
UserHandleClass.method {
|
||||
name = "getUserId"
|
||||
param(IntType)
|
||||
}.ignored().get().int(systemContext.packageManager.getApplicationInfo(packageName, PackageManager.GET_ACTIVITIES).uid)
|
||||
}.getOrNull() ?: 0
|
||||
|
||||
/**
|
||||
* Hook 模块 APP 相关功能 - 包括自身激活状态、Resources Hook 支持状态以及 [SharedPreferences]
|
||||
|
Reference in New Issue
Block a user