message="IMediaProjectionManager permission check should be converted to @EnforcePermission annotation"
category="Security"
priority="5"
summary="Manual permission check can be @EnforcePermission annotation"
explanation="Whenever possible, method implementations of AIDL interfaces should use the @EnforcePermission
annotation to declare the permissions to be enforced. The verification code is then
generated by the AIDL compiler, which also takes care of annotating the generated java
code.

This reduces the risk of bugs around these permission checks (that often become vulnerabilities).
It also enables easier auditing and review.

Please migrate to an @EnforcePermission annotation. (See: go/aidl-enforce-howto)"
errorLine1=" if (mContext.checkCallingOrSelfPermission(MANAGE_MEDIA_PROJECTION)"