Oh I see.

So if the user presses Home and then uses the power button, then it
*could* fall asleep (in the case where the activity has been killed by
the system)?

On Apr 13, 11:16 am, MrChaz <mrchazmob...@googlemail.com> wrote:
> iirc, that flag means the system gets a wake lock for the life of the
> activity for you.
>
> On Apr 13, 9:52 am, westmeadboy <westmead...@yahoo.co.uk> wrote:
>
>
>
> > I have a service which, when started, does some stuff (like
> > downloading files) typically taking about 2-3 minutes.
>
> > If I start this service and then immediately use the power button to
> > switch off the screen, then I would expect the phone, at some point,
> > to fall asleep. But it never seems to fall asleep while the service is
> > still doing its stuff. At least, not on my Nexus One.
>
> > I'm not using a wake lock (though I do use
> > WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON in the activity that
> > monitors the service progress).
>
> > So is it true that I don't need to use a 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 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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to