Hi I started to be curious about deep sleep in Android. Cause I found this term "deep sleep" in android document while I'm searching for handler.
public final boolean postDelayed (Runnable r, long delayMillis)
Causes the Runnable r to be added to the message queue, to be run after the specified amount of time elapses. The runnable will be run on the thread to which this handler is attached. The time-base is SystemClock.uptimeMillis(). Time spent in deep sleep will add an additional delay to execution.
So I tried to find what Deep sleep is, when it occurs and what happens during it. But I couldn't find any official documents related to it but found Doze mode. Therefore.. I guessed that Deep sleep is an old term used before Doze mode was adopted.
My question is "Is deep sleep really existing in Android system and what is the difference between deep sleep and doze?". And also "if it exists, then when does it occur and what does happen during deep sleep?"
Thank for reading this question.
It's difficult to find the documentation on this indeed, but judging from what is available, by deep sleep they refer to the state when the processor is set to the lowest possible frequency.
The main difference between this and doze is that there are no restrictions for the applications: wake locks still work, alarms still happen, network is still available, and so on. However, if you don't hold a wake lock, you will not get enough CPU time to do anything meaningful. Deep sleep is still relevant as your system may not be in the doze mode, but already in the deep sleep state.