Hi David,

Yes, that's what I tried. I guess I'd need to add the DISABLE_KEYGUARD
permisson to the app that I am driving using jUnit, but I want to
avoid code modification. At the moment the app only needs to be
resigned before tests.

I've written a separate app that unlocks the screen, and once the
screen is unlocked, the jUnit test starts.

thanks,
Jakub

On Dec 13, 10:13 pm, David Strickland <[email protected]> wrote:
> On Dec 13, 5:02 pm, JakubCzaplicki<[email protected]> wrote:
>
>
>
>
>
>
>
>
>
> > Hi All,
>
> > Is there a way to unlock the screen after boot-up in jUnit ?
>
> > I tried the deprecated keyguardManager.newKeyguardLock() method. I've
> > set the required DISABLE_KEYGUARD permission in jUnit manifest, but
> > the test still claims : "java.lang.SecurityException: Requires
> > DISABLE_KEYGUARD permission".
>
> > I have also tried to set the
> > WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD flags, but in this
> > case I've got the following err msg : "android.view.ViewRootImpl
> > $CalledFromWrongThreadException: Only the original thread that created
> > a view hierarchy can touch its views"
>
> > Thanks,
> > Jakub
>
> Latest technique recommended by Google found 
> here:http://developer.android.com/guide/topics/testing/activity_testing.ht...
>
> ... or is that what you've already tried?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to