title: Android check permission
body: <p>I am developing my project in SDK version 23 where app permissions were newly introduced.
  In some guidelines they were using below code to read phone state permission is granted or not</p>
  
  <pre><code>if (ContextCompat.checkSelfPermission(serviceContext, Manifest.permission.READ_PHONE_STATE) == PackageManager.PERMISSION_GRANTED) {
      //Read Phone state
     }else{
  }
  </code></pre>
  
  <p>But i am directly accessing <code>checkSelfPermission</code> like below</p>
  
  <pre><code>if(serviceContext.checkSelfPermission(Manifest.permission.READ_PHONE_STATE) == PackageManager.PERMISSION_GRANTED) {
        //Read Phone state
     }else{
  }
  </code></pre>
  
  <p>It's working fine.
  My question is what's the difference between above these codes?.which is the correct way to check for permission granted or not?</p>