-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lint CallNeedsPermission on same named function #602
Comments
Thank you for your report! Would you mind open a pull request? You can reproduce the bug in PermissionsDispatcher/lint/src/test/java/permissions/dispatcher/CallNeedsPermissionDetectorTest.kt Line 11 in 0c1a6b4
PermissionsDispatcher/lint/src/main/java/permissions/dispatcher/CallNeedsPermissionDetector.java Line 27 in 0c1a6b4
|
@repitch 👀 |
@hotchemi I'll try to fix it and open a PR as soon as find some free time, maybe on the upcoming weekends! |
I am getting a similar problem with two methods in the same class, one annotated, one is not. One of the methods has a boolean parameter. So this doesn't only affect methods in seperate classes, but also ones with different parameter counts. |
The original issue was resolved with #627 but #602 (comment) is kind of difficult to address...🤔Anyway let me create another issue for tracking. |
#502 - is almost the same except now both classes are annotated with
@RuntimePermissions
Overview
I have two classes (i.e. Activities), both annotated with
@RuntimePermissions
, both contains same named function, but the first one is annotated with@NeedsPermission
, the second one - is notBoth classes has someFun(), but the second one is not annotated, so it shouldn't be treated as an error
Expected
Lint will not show any error
Actual
/SecondActivity.kt:21: Error: Trying to access permission-protected method directly [CallNeedsPermission]
someFun()
Environment
Reproducible steps
The text was updated successfully, but these errors were encountered: