Search code examples
androidsleepwakelockandroid-kernel

Android Autosleep


Currently I'm locking at the Android Kernel and I'm wondering about the Wake lock mechanism. How and where is the interval time specified which defines at what point the phone will suspend. Is there a sysfs interface which passes a value (in milliseconds or something) to the kernel. For example the sleep option in the Android OS settings how does a change there reflects in the kernel?


Solution

  • After some research and digging within the Android sources I saw that the PowerManagerService is taking care of measuring the time since the last activity in order to send the device to sleep.