Skip to content

Commit

Permalink
Merge pull request chenxiaolong#481 from chenxiaolong/call_log
Browse files Browse the repository at this point in the history
RemoveHardRestrictions: Fix version check for Android 14
  • Loading branch information
chenxiaolong committed Dec 31, 2023
2 parents bf946a3 + 2342c45 commit 69c574c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,7 @@ private fun removeRestriction(packageName: String, permission: String, userId: I
throw IllegalArgumentException("Package $packageName is not installed for user $userId")
}

val (getFlags, updateFlags) = if (Build.VERSION.SDK_INT in
Build.VERSION_CODES.R..Build.VERSION_CODES.TIRAMISU) {
val (getFlags, updateFlags) = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
val permissionManager = PermissionManagerProxy.instance

Pair(
Expand All @@ -222,7 +221,7 @@ private fun removeRestriction(packageName: String, permission: String, userId: I
packageName, permission, mask, set, false, userId)
},
)
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
} else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.Q) {
Pair(
{ packageManager.getPermissionFlags(permission, packageName, userId) },
{ mask: Int, set: Int ->
Expand Down

0 comments on commit 69c574c

Please sign in to comment.