title: How permission can be checked at runtime without throwing SecurityException?
body: <p>I design a function that may get/set a resource from SD and if not found from sd then take it from Asset and if possible write the asset back to SD<br/>
  This function may check by method invocation if SD is mounted and accessible...</p>
  
  <pre><code>boolean bSDisAvalaible = Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
  </code></pre>
  
  <p>My designed function may be used from one app(project) to another (with or without android.permission.WRITE_EXTERNAL_STORAGE)</p>
  
  <p>Then I would like to check if the current application has this particular permission without playing with SecurityException.</p>
  
  <p>Does it exist a "nice" way to consult current defined permissions at runtime ?</p>