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
Loading
Please register or sign in to comment