Merge "Add instructions on how to annotate an AIDL interface" am: b6df9fb2e8 am: b691d9ce36 am: 9e7a44c173 am: 3ced8e8092

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1912992

Change-Id: I1ea1b54a51dea6dd9a65f4a0ee497eec77d36f3b
This commit is contained in:
Cole Faust
2021-12-09 19:24:08 +00:00
committed by Automerger Merge Worker

View File

@@ -189,7 +189,10 @@ public final class RequiresPermissionChecker extends BugChecker
if (!actualPerm.containsAll(expectedPerm)) {
return buildDescription(tree)
.setMessage("Method " + method.name.toString() + "() annotated " + expectedPerm
+ " but too wide; only invokes methods requiring " + actualPerm)
+ " but too wide; only invokes methods requiring " + actualPerm
+ "\n If calling an AIDL interface, it can be annotated by adding:"
+ "\n @JavaPassthrough(annotation=\""
+ "@android.annotation.RequiresPermission(...)\")")
.build();
}