Yeah the repercussions of neglecting wake locks is largely luck -- for example it is not uncommon for the device to be synchronizing in the background, or receiving data, or doing something else that holds its own wake lock, allowing you to run, Also when plugged in to USB a wake lock is held so the CPU will never go to sleep during that time.
On Fri, Dec 18, 2009 at 11:09 PM, Alberto <[email protected]> wrote: > Thanks, that clears things up. I guess I was somehow lucky that this > worked for me, maybe the device wasn't going back to sleep quickly > enough in my case. I'll implement the broadcast receiver and wakelock > to ensure this always works. > > > On Dec 18, 4:25 pm, Dianne Hackborn <[email protected]> wrote: > > A wake lock is not currently held for services; you will need to wrap it > > with a broadcast receiver. (Actually it is held, but because services > are > > async the power manager is immediately told that the pending intent has > been > > sent, and releases its wake lock.) > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] 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 [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

