Skip to content

Commit

Permalink
fix?: fallback to Q suspend if api in U is not changed in some distro #…
Browse files Browse the repository at this point in the history
  • Loading branch information
aistra0528 committed Mar 24, 2024
1 parent 81585db commit 93aad91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/main/kotlin/com/aistra/hail/utils/HShizuku.kt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ object HShizuku {
userId /*suspendingUserId*/,
userId /*targetUserId*/
)
}.getOrElse { setPackagesSuspendedAsUserSinceQ(pm, packageName, suspended) }
}.getOrElse {
if (it is NoSuchMethodException) setPackagesSuspendedAsUserSinceQ(pm, packageName, suspended)
else throw it
}

HTarget.Q -> setPackagesSuspendedAsUserSinceQ(pm, packageName, suspended)

Expand Down

0 comments on commit 93aad91

Please sign in to comment.