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

Skip to content
Commit af19a09a authored by mattgilbride's avatar mattgilbride
Browse files

Add @PermissionName annotation to complement @PermissionMethod

For use by static analysis, @PermissionMethod documents
the methods in the platform that perform permission "checks" (e.g.
context.enforceCallingOrSelfPermission).

@PermissionName denotes that the annoated String is a permission name.
It is typically used to annotate the argument to a @PermissionMethod
that is the permission value.  This is consumed by static analysis, for
example when helper methods wrap @PermissionMethod calls to pass a hard
coded permission value e.g. "enforceAudioSettingsPermission".

See: go/enforcepermission-migration-design
Bug: 247537842
Test: Tested manually, ultimately will be tested in presubmit (atest
AndroidFrameworkLintCheckerTest, see b/240445172)

Change-Id: I811ae923de62046e782ec7b109a0f99483dab4b2
parent 4b3b29f0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment