Android Studio add permission check bug?
<p>Ok, I have the following code and warning in AS:
<a href="https://i.stack.imgur.com/5QOrY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5QOrY.png" alt="enter image description here"></a></p>

<p>When I agree to add such check, AS insert following code:<br></p>

<pre><code>if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &amp;&amp;
                ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
            // TODO: Consider calling
            //    ActivityCompat#requestPermissions
            // here to request the missing permissions, and then overriding
            //   public void onRequestPermissionsResult(int requestCode, String[] permissions,
            //                                          int[] grantResults)
            // to handle the case where the user grants the permission. See the documentation
            // for ActivityCompat#requestPermissions for more details.
            return TODO;
        }
</code></pre>

<p><strong>And I'm just wondering, why AND operator is using?<br></strong>
If user reject only one of permissions above, such check wouldn't be working, as for me.</p>

<p>Or I miss something?</p>