Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9de78dea authored by Akhil Gangu's avatar Akhil Gangu
Browse files

Update install permissions policy to handle app compat purpose

declarations.

1. Purpose validation should only apply if the app's targetSdkVersion is greater than or equal to the requiresPurposeTargetSdkVersion set on the permission. This will ensure pre-existing permissions changed to require purpose will be granted gracefully to handle app compat cases.
2. A declared purpose is only valid if the app's targetSdkVersion is less than or equal to the purposes's maxTargetSdkVersion. This ensures a deprecated purpose can continue to be used for versions <= maxTargetSdkVersion while requiring a new valid purpose for versions above it.

Bug: 412443420
Bug: 422817717
Test: atest AppIdPermissionPolicyTest
Flag: android.permission.flags.purpose_declaration_enabled
Change-Id: I6a05ba2bf6c842b720720be291aaf847743e8d0f
parent a8577c51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment