I am having a permission issue in the ActivityManagerService.java class. I created a more or less a utility class MyUtils.java for example. I have a static method checkWifi(). In this method, I instantiated a wifi manager object and called the iswifienabled() method. I inserted checkWifi() in AMS's startActivity() method, and now it I cannot launch any application in the emulator. It throws a security exception stating that neither you or the process have sufficient privilege. Can anyone be of help?! I have a deadline and this is the last step in test my custom ROM.
E/Launcher( 318): Launcher does not have the permission to launch Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.contacts/.activities.PeopleActivity bnds=[96,706][192,802] }. Make sure to create a MAIN intent-filter for the corresponding activity or use the exported attribute for this activity. tag=ShortcutInfo(title=Peopleintent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.contacts/.activities.PeopleActivity bnds=[96,706][192,802] }id=10 type=0 container=-101 screen=1 cellX=1 cellY=0 spanX=1 spanY=1 isGesture=false dropPos=null) intent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.contacts/.activities.PeopleActivity bnds=[96,706][192,802] }
E/Launcher( 318): java.lang.SecurityException: WifiService: Neither user 10009 nor current process has android.permission.ACCESS_WIFI_STATE.
E/Launcher( 318): at android.os.Parcel.readException(Parcel.java:1425)
E/Launcher( 318): at android.os.Parcel.readException(Parcel.java:1379)
E/Launcher( 318): at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1761)
E/Launcher( 318): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1411)
E/Launcher( 318): at android.app.Activity.startActivityForResult(Activity.java:3351)
E/Launcher( 318): at android.app.Activity.startActivity(Activity.java:3521)
E/Launcher( 318): at com.android.launcher2.Launcher.startActivity(Launcher.java:1951)
E/Launcher( 318): at com.android.launcher2.Launcher.startActivitySafely(Launcher.java:1969)
E/Launcher( 318): at com.android.launcher2.Launcher.onClick(Launcher.java:1827)
E/Launcher( 318): at android.view.View.performClick(View.java:4084)
E/Launcher( 318): at android.view.View$PerformClick.run(View.java:16966)
E/Launcher( 318): at android.os.Handler.handleCallback(Handler.java:615)
E/Launcher( 318): at android.os.Handler.dispatchMessage(Handler.java:92)
E/Launcher( 318): at android.os.Looper.loop(Looper.java:137)
E/Launcher( 318): at android.app.ActivityThread.main(ActivityThread.java:4745)
E/Launcher( 318): at java.lang.reflect.Method.invokeNative(Native Method)
E/Launcher( 318): at java.lang.reflect.Method.invoke(Method.java:511)
E/Launcher( 318): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/Launcher( 318): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/Launcher( 318): at dalvik.system.NativeStart.main(Native Method)