title: Why RECORD_AUDIO is returning permission granted everytime in marshmallow?
body: <p>I am working with media recorder in my application.When I am asking for permission for Record audio in marshmallow and above versions it is returning me permission granted everytime. Here is my code.</p>
  
  <pre><code>private static final int REQUEST_RECORD_AUDIO_PERMISSION = 200;
  // Requesting permission to RECORD_AUDIO
  private boolean permissionToRecordAccepted = false;
  private String[] permissions = {Manifest.permission.RECORD_AUDIO};
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      // Defined SoundLevelView in main.xml file
      setContentView(R.layout.activity_noice_meter);
      //check for permission
      ActivityCompat.requestPermissions(this, permissions, REQUEST_RECORD_AUDIO_PERMISSION);
  }
  
  @Override
  public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
      super.onRequestPermissionsResult(requestCode, permissions, grantResults);
      switch (requestCode) {
          case REQUEST_RECORD_AUDIO_PERMISSION:
  
              permissionToRecordAccepted = grantResults[0] == PackageManager.PERMISSION_GRANTED;
  
              break;
      }
      if (!permissionToRecordAccepted) {
  
          finish();
      } else {
          //Task to be done when permission is granted
          //init();
      }
  
  }
  </code></pre>