Android airplane mode API lvl 17 toggle
<p>Since api lvl 17 airplane mode setting was moved from Settings.System to <a href="http://developer.android.com/reference/android/provider/Settings.Global.html" rel="nofollow">Settings.Global</a></p>

<p>Problem is that now i can't  switch setting anymore. API description is that those settings are read only. Did anyone manage to find a way to change it?</p>

<p>Pre API lvl 17 code that worked: </p>

<pre><code>Settings.System.putInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 1);
</code></pre>

<p>API lvl 17 code that I tried and doesn't work :</p>

<pre><code>Settings.Global.putInt(context.getContentResolver(), Settings.Global.AIRPLANE_MODE_ON, setMode);
</code></pre>

<p>It throws exception (documentation says it should throw silent log error):</p>

<pre><code>11-14 13:39:51.649: E/AndroidRuntime(3509): java.lang.SecurityException: Permission denial: writing to secure settings requires android.permission.WRITE_SECURE_SETTINGS
</code></pre>

<p>but I have this permission in manifest :</p>

<pre><code>&lt;uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" /&gt;
</code></pre>

<p>If anyone knows a way to solve this that would be awesome!!</p>
