Add @PermissionMethod annotation
For use by static analysis, @PermissionMethod documents the methods in the platform that perform permission "checks" (e.g. context.enforceCallingOrSelfPermission). Said methods either return in int of type @PermissionResult, or return void and potentially throw a SecurityException. There are currently two platform lints that care about this information. ManualPermissionCheckDetector and PackageVisibilityDetector. See: go/enforcepermission-migration-design Bug: 247537842 Test: Tested manually, ultimately will be tested in presubmit (atest AndroidFrameworkLintCheckerTest, see b/240445172) Change-Id: Ia21ba748eab37b532b591edb2599bb78ea0c8c9d
Loading
Please register or sign in to comment