If you want to talk about anything you explicitly go into as a low-power "sleep mode" state, that would be turning off the screen.
Once you are in this state (the screen is off), then the CPU *may* no longer need to run, but Android does not have an explicit switch to go into a lower-power "CPU not running" mode. Holding a wake lock tells the system that you need to keep the CPU running. Once no more wake locks are held, the CPU is stopped; at that point, the only way it can be restarted is by an external interrupt such as from incoming network data, a timer going of (typically scheduled by the AlarmManager), certain hardware buttons being pressed, etc. There are of course all kinds of power management levels going on within these states -- for example CPU stepping levels depending on the amount of work the CPU needs to do, many CPUs can go into a "power collapse" state when there is a wake lock held but the CPU is waiting for work to do, etc. On Mon, Apr 2, 2012 at 3:16 PM, Dan <[email protected]> wrote: > > > On Apr 2, 9:56 am, Mark Murphy <[email protected]> wrote: > > On Mon, Apr 2, 2012 at 9:50 AM, Dan <[email protected]> wrote: > > >> > On screen-off, i.e. when it hits the sleep mode, are the wifi > radios and CPU > > >> > disabled/switched-off? > > > > >> The CPU stops running. > > > > > This is demonstrably wrong, as you can have a PARTIAL_WAKE_LOCK held > > > and not have the screen on (or even just have ADB gathering logs even > > > after the short/long power button press to turn the screen off.) > > > > The question was "when it hits the sleep mode", and a > > PARTIAL_WAKE_LOCK prohibits the device from reaching sleep mode. > > Note that even without the PARTIAL_WAKE_LOCK held, on many devices > there is a period where the CPU is still active after the screen goes > blank (call it PARTIAL_WAKE without the lock held) which makes > defining > a test case to be sure that a particular device will "do the right > thing when an alarm goes off while the CPU is not running" difficult. > > > That being said, I neglected to correct the OP on equating "screen > > off" with "hits the sleep mode", and for that I apologize. > > Given Dianne's view of: > > > On Android "sleep mode" is the screen being off. What do you mean by > > "sleep mode"? > > it's easy to see how the OP might have made that assumption. I > apologize > for my tone as well, I've been fighting with issues on some firmware > where a PendingIntent fed an Intent that has had the class set with > Intent.setClass() doesn't make it from the AlarmManager to my receiver > and was hoping for an answer that would make how to test this sort of > thing easy instead of "we don't acknowledge any difference between > screen off and cpu off". > > -- > 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 > -- 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

