title: Check M permission is granted or denied from non activity class
body: <p>In my application i want to perform specific function that exist in non activity class but before perform this function should check for some permission is granted or not. I handle request permission in run time but how i can check if the user deny this permission and check never show again.<br></p>
  
  <p>In my case i check if the permission is granted using </p>
  
  <pre><code>if(ContextCompat.checkSelfPermission(context,Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED)
  </code></pre>
  
  <p>but this give me false any time i check it also when set permission <code>Always deny</code> from settings and when try to check it using another way </p>
  
  <pre><code>if (ActivityCompat.shouldShowRequestPermissionRationale(context, Manifest.permission.READ_CONTACTS))
  </code></pre>
  
  <p>but also give me false when deny permission and check never show again.<br></p>
  
  <p>so what is the best way to check if user deny any permission and check never show again <code>from run time permission dialog or deny it from application settings</code><br></p>