title: Check permission always return denied
body: <p>I was asking for <code>WRITE_EXTERNAL_STORAGE</code> permission with the following statement</p>
  <pre><code>ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.WRITE_EXTERNAL_STORAGE), PERMISSION_WRITE)
  </code></pre>
  <p>This was working...until now. In the method <code>onRequestPermissionsResult</code>, <code>grantResults</code> always contains -1</p>
  <pre><code>override fun onRequestPermissionsResult(requestCode: Int, permissions: Array&lt;String?&gt;, grantResults: IntArray) {
      
      super.onRequestPermissionsResult(requestCode, permissions, grantResults)
      if (requestCode == PERMISSION_WRITE) {
          if (grantResults.isNotEmpty() &amp;&amp; grantResults[0] == PackageManager.PERMISSION_GRANTED) {
  
              Timber.i(&quot;PERMISSION GRANTED&quot;)
          } else {
  
              showSettingsDialog()
          }
      }
  }
  </code></pre>
  <p>Also, I have the uses-permission in the manifest</p>
  <pre><code>&lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; /&gt;
  </code></pre>
  <p>The thing is, if I go to the app settings the permission appears as granted but from the app it always return is not granted.</p>
  <p>I tried deleting build folders because none has changed and this was working fine for a week</p>
  <p>Any idea about what can I test?</p>
  <p>best regards</p>