I want to create a custom method that will check for Android permissions at runtime.
The problem is that when I use this method instead of the one proposed by the Android Studio, I get a lint warning saying I should check for permissions.
How can I tell lint that my method does the same work as the method from the Android studio? I don't want to be forced to use @SuppressLint("MissingPermission")
every time I use my method.
Here is an example of what I'm trying to achieve :
if (PermissionManager.isPermissionGranted(this, /* A PERMISSION*/)
{
//Permission Granted
}
Is there any way to tell lint that isPermissionGranted will check if the permission has been granted?