Fix EnforcePermission lint false positive on generated interfaces
EnforcePermissionDetector and EnforcePermissionHelperDetector were
scanning all methods annotated with @EnforcePermission, which
included the method declaration on the (generated) interface itself,
as well as the methods of the (generated) Default and Proxy classes.
Update EnforcePermissionHelperDetector to ignore all abstract methods
(e.g. those defined in the generated interface declaration).
Update EnforcePermissionDetector to specifically target, and ignore,
methods of the generated Default and Proxy classes.
Bug: 236558918
Test: EnforcePermissionHelperDetectorCodegenTest,
EnforcePermissionDetectorCodegenTest
Change-Id: I12cb46cb771e65600a9daf3efce199fd9311a53b
7 files changed