WRITE_SETTINGS Permission ambiguity
<p>I'm building my app for android 6.0 Marshmallow, it needs <strong>WRITE_SETTTINGS</strong> permission. After searching <a href="https://stackoverflow.com/questions/32083410/cant-get-write-settings-permission/32083622#32083622">from here</a> I came to know that calling this: </p>

<pre><code>requestPermissions(new String[]{Manifest.permission.WRITE_SETTINGS},
              101);
</code></pre>

<p>won't show dialog permission. So, based on <a href="https://stackoverflow.com/users/115145/commonsware">CommonsWare</a> solution, we should check if <code>Settings.System.canWrite()</code>
returns true or false. So, I should call Activity with <code>ACTION_MANAGE_WRITE_SETTINGS</code>   as action.</p>

<p>But the issue is when I call this activity, it shows my app has already been granted permission though the method <code>Settings.System.canWrite()</code> returns false. </p>

<p>Am I missing something here or I have to disable it then enable it again.</p>