Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e7a44c1 authored by Cole Faust's avatar Cole Faust Committed by Automerger Merge Worker
Browse files

Merge "Add instructions on how to annotate an AIDL interface" am: b6df9fb2 am: b691d9ce

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

Change-Id: I3e07bc2ae190342f115ce3421e20260a1c6ae4e6
parents d5a32602 b691d9ce
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -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();
        }
        }