How to disable SMS notification programmatically?
<p>This not work:</p>

<pre><code>try {
    Context mmsContext = context.createPackageContext("com.android.mms", Context.CONTEXT_IGNORE_SECURITY);
    mmsContext.grantUriPermission(context.getPackageName(), 
    Uri.parse("file:///data/data/com.android.mms/shared_prefs/com.android.mms_preferences.xml"), 
    Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
    SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(mmsContext);
    Editor editor = settings.edit();
    editor.putBoolean("pref_key_enable_notifications", false);
    editor.commit();
} catch (NameNotFoundException e1) {
    e1.printStackTrace();
}
</code></pre>

<p>Error: "Attempt to read preferences file /data/data/com.android.mms/shared_prefs/com.android.mms_preferences.xml without permission"
Help, please!</p>
