3
0
Fork 0
android_frameworks_base/tools/lint/utils
Azhara Assanova 87a167d82f Migrate PermissionAnnotationDetector to global lint checks
Cherry-picked from internal branch. Originally authored by
tmagirescu@google.com.

PermissionAnnotationDetector will no longer be a local lint check which
could optionally be added to build targets, but instead a global lint
check ran on every build. New AIDL Interfaces part of the system_server
process will need to use @EnforcePermission annotations. The detector
does not enforce old AIDL Interfaces to use the annotations. These are
included in the exemptAidlInterfaces set generated by
ExemptAidlInterfacesGenerator.

The CL removes the reference to the PermissionAnnotationDetector from
the Accessibility Service build targets. Instead the already-annotated
AIDL Interfaces are removed from exemptAidlInterfaces, achieving the
same effect.

Bug: 363248121
Test: PermissionAnnotationDetectorTest
Flag: EXEMPT lint check
Merged-In: I2cad77cbc7883087dd95b9558d3543fcb321bbc8
Change-Id: I47873ec83d8f26a97f1f6ff70a056899dd9c5f45
2024-09-13 14:14:48 +00:00
..
checks/src
Android.bp
README.md
enforce_permission_counter.py
generate-exempt-aidl-interfaces.sh

README.md

Utility Android Lint Checks for AOSP

This directory contains scripts that execute utility Android Lint Checks for AOSP, specifically:

  • enforce_permission_counter.py: Provides statistics regarding the percentage of annotated/not annotated AIDL methods with @EnforcePermission annotations.
  • generate-exempt-aidl-interfaces.sh: Provides a list of all AIDL interfaces in the entire source tree.

When adding a new utility Android Lint check to this directory, consider adding any utility or data processing tool you might require. Make sure that your contribution is documented in this README file.