Reputation: 11741
I work on a project that currently asks for 21 (!) permissions.
I want to clean that up as I believe a lot of them are not necessary (for instance, there is a permission for android.permission.CALL_PHONE
which can be removed as pretty much the same thing can be achieved with an Intent
with ACTION_DIAL
).
What I want to know is a way to, given a permission (say, android.permission.AUTHENTICATE_ACCOUNTS
) find all methods which require that permission.
Note that the opposite is easy, i.e., given a method, it is easy to find if that method requires any permission (just go to the documentation and check), but what about the other way around?
Upvotes: 5
Views: 1980
Reputation: 8928
Here you can find all methods that PScout found which require Android permissions. PScout was a tool that did this particular work you need, but the original website is offline.
PScout results- map of Android permissions and methods that require those permissions
Upvotes: 1
Reputation: 11741
After researching this again, I came across a similar question on SO. Ben Holland explains there are 2 studies done about this problem. None of the solutions proposed are 100% flawless, but it is the best we have so far.
More details at: https://stackoverflow.com/a/24019120/1369016
Upvotes: 0
Reputation: 1616
No way else the compiler would warn you if you haven't set a Permission. No, instead the application just crashes on runtime.
Im sorry but you have to go the long way and search for methods that you think might need permissions and delet them
Upvotes: 0