Merge "Add instructions on how to annotate an AIDL interface" am: b6df9fb2e8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1912992 Change-Id: Ibb49b112a88bbd866b5fd32be86a0961fbfa4531
This commit is contained in:
@@ -187,7 +187,10 @@ public final class RequiresPermissionChecker extends BugChecker
|
|||||||
if (!actualPerm.containsAll(expectedPerm)) {
|
if (!actualPerm.containsAll(expectedPerm)) {
|
||||||
return buildDescription(tree)
|
return buildDescription(tree)
|
||||||
.setMessage("Method " + method.name.toString() + "() annotated " + expectedPerm
|
.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();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user