Add reporting tool for migration to @EnforcePermission
Add a tool "enforce_permission_counter" which leverages lint_fix and the
AndroidUtilsLintChecker linter to report on the number of AIDL methods
that have been migrated to use the @EnforcePermission annotation (or
@RequiresNoPermission).
Test: enforce_permission_counter
Test: lint_fix --print --no-fix --check AnnotatedAidlCounter \
--lint-module AndroidUtilsLintChecker services.autofill
Bug: 298285238
Change-Id: I521ab5358476f63387674e17c601da3b63cbc1d8
diff --git a/tools/lint/utils/Android.bp b/tools/lint/utils/Android.bp
index 75e8d68..439c86d 100644
--- a/tools/lint/utils/Android.bp
+++ b/tools/lint/utils/Android.bp
@@ -43,3 +43,9 @@
"AndroidUtilsLintChecker",
],
}
+
+python_binary_host {
+ name: "enforce_permission_counter",
+ srcs: ["enforce_permission_counter.py"],
+ libs: ["soong_lint_fix"],
+}