Dianne, There seems to be a bug in ActivityManagerNative.java. The return of value of 1 (when monkey is running) is being treated as an exception. Looks like the order of reading/writing the exception is mixed-up in the parcel.
On Oct 17, 11:39 pm, Dianne Hackborn <hack...@android.com> wrote: > What are you running this on? In the standard platform implementation this > is pretty much not possible. (All it does is call into the activity manager > which returns whether one of its variables is non-null.) > > > > On Sun, Oct 17, 2010 at 8:24 PM, George <bipi...@gmail.com> wrote: > > // Short Msg: java.lang.RuntimeException > > // Long Msg: java.lang.RuntimeException: Unknown exception code: 1 msg > > null > > ... > > // Build Changelist: 1681 > > // Build Time: 1286811002000 > > // java.lang.RuntimeException: Unknown exception code: 1 msg null > > // at android.os.Parcel.readException(Parcel.java:1257) > > // at android.os.Parcel.readException(Parcel.java:1235) > > // at > > android.app.ActivityManagerProxy.isUserAMonkey(ActivityManagerNative.java: > > 2754) > > // at > > android.app.ActivityManager.isUserAMonkey(ActivityManager.java:990) > > > I get the following exception when trying to use the isUserAMonkey API > > on a keydown. > > mAM = > > (android.app.ActivityManager)getSystemService(Context.ACTIVITY_SERVICE); > > if (mAM.isUserAMonkey()) { > > return true; > > } > > Any reason why this may be happening? > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en