Ya, I am checking isHeld() before I release it when I do it
manually...  But, apparently when you set a timeout, whatever part of
android releases the wakelock does not check if it is held.  That is
my problem.  If I manually release it before the timeout, when the
timeout comes, I get an under-locked exception.

On Jul 7, 9:32 am, Mark Murphy <mmur...@commonsware.com> wrote:
> On Wed, Jul 7, 2010 at 12:26 PM, jdeslip <jdes...@gmail.com> wrote:
> > Is there any way to use a timeout (as backup wakelock release in case
> > the app force closes for some reason) without getting this error?
>
> Check isHeld() before release()-ing it.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.8 Available!

-- 
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

Reply via email to