StatusBarManager
<p>I would like to use <code>public static final int DISABLE_NOTIFICATION_ALERTS</code> declared inside <code>StatusBarManager</code> in my application and below mentioned is an excerpt of code from my app</p>

<pre><code>Object object = getSystemService("statusbar");

    Class&lt;?&gt; statusBarManager;
    try {
        statusBarManager = Class.forName("android.app.StatusBarManager");
        Method[] method = statusBarManager.getMethods();
        Field fld[] = statusBarManager.getDeclaredFields();
        for (int i = 0; i &lt; fld.length; i++) {
            String s = fld[i].toString();

        }
        Class name = object.getClass();

        Field field = statusBarManager
                .getDeclaredField("DISABLE_NOTIFICATION_ALERTS");

        android.util.Log.i("MainActivity", "value of::: " + field);

        Method disable = statusBarManager.getMethod("disable",
                new Class[] { int.class });

        disable.setAccessible(true);

        field.setAccessible(true);
        disable.invoke(object,new Integer(262144));

    } catch (ClassNotFoundException e) {
        // TODO Auto-generated catch block
        Log.i("MAinActivity::", "No Such Class Found Exception");
        e.printStackTrace();
    } catch (Exception e) {
        // TODO Auto-generated catch block
        Log.i("MAinActivity::", " Exception occur");
        e.printStackTrace();
    }
</code></pre>

<p>Inside <code>AndroidManifest.xml</code> </p>

<p></p>

<pre><code>&lt;permission
    android:name="android.permission.STATUS_BAR_SERVICE"

    /&gt;
</code></pre>

<p>Exception is as under</p>

<pre><code>01-01 11:45:59.504: W/System.err(676): java.lang.reflect.InvocationTargetException
01-01 11:45:59.514: W/System.err(676):  at java.lang.reflect.Method.invokeNative(Native Method)
01-01 11:45:59.514: W/System.err(676):  at java.lang.reflect.Method.invoke(Method.java:511)
01-01 11:45:59.514: W/System.err(676):  at com.example.stopmms.MainActivity.onCreate(MainActivity.java:90)
01-01 11:45:59.514: W/System.err(676):  at android.app.Activity.performCreate(Activity.java:5008)
01-01 11:45:59.514: W/System.err(676):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
01-01 11:45:59.514: W/System.err(676):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
01-01 11:45:59.514: W/System.err(676):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
01-01 11:45:59.514: W/System.err(676):  at android.app.ActivityThread.access$600(ActivityThread.java:130)
01-01 11:45:59.514: W/System.err(676):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
01-01 11:45:59.514: W/System.err(676):  at android.os.Handler.dispatchMessage(Handler.java:99)
01-01 11:45:59.524: W/System.err(676):  at android.os.Looper.loop(Looper.java:137)
01-01 11:45:59.524: W/System.err(676):  at android.app.ActivityThread.main(ActivityThread.java:4745)
01-01 11:45:59.524: W/System.err(676):  at java.lang.reflect.Method.invokeNative(Native Method)
01-01 11:45:59.524: W/System.err(676):  at java.lang.reflect.Method.invoke(Method.java:511)
01-01 11:45:59.524: W/System.err(676):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
01-01 11:45:59.534: W/System.err(676):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
01-01 11:45:59.534: W/System.err(676):  at dalvik.system.NativeStart.main(Native Method)
01-01 11:45:59.534: W/System.err(676): Caused by: java.lang.SecurityException: StatusBarManagerService: Neither user 10045 nor current process has android.permission.STATUS_BAR.
01-01 11:45:59.544: W/System.err(676):  at android.os.Parcel.readException(Parcel.java:1425)
01-01 11:45:59.544: W/System.err(676):  at android.os.Parcel.readException(Parcel.java:1379)
01-01 11:45:59.544: W/System.err(676):  at com.android.internal.statusbar.IStatusBarService$Stub$Proxy.disable(IStatusBarService.java:324)
01-01 11:45:59.544: W/System.err(676):  at android.app.StatusBarManager.disable(StatusBarManager.java:91)
01-01 11:45:59.544: W/System.err(676):  ... 17 more
</code></pre>

<p>It gives me the above mentioned exception</p>
