Merge "Add instructions on how to annotate an AIDL interface"

This commit is contained in:
Cole Faust
2021-12-09 17:52:31 +00:00
committed by Gerrit Code Review

View File

@@ -187,7 +187,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();
}