How to check if Android Permission is actually being used?

后端 未结 4 1632
忘掉有多难
忘掉有多难 2020-12-29 01:40


I am maintaining one existing (very-huge, very-sensitive) Android Application.
The other day, I have received an email from my client that, the Application mig

4条回答
  •  礼貌的吻别
    2020-12-29 01:45

    I tried the method suggested by Vasanth but it doesn't work for me. In fact, because my project has flavors and Code Inspection doesn't work for the project with flavors. See https://code.google.com/p/android/issues/detail?id=210073.

    But Running Lint from console works. So steps are simple:

    1. Remove permissions from your manifest.
    2. Run Lint for flavor as described here https://stackoverflow.com/a/32708435/1170154.
    3. Open Lint result and find section Correctness > Error MissingPermission: Missing Permissions. It will contain all calls that require permissions.

提交回复
热议问题