Hi,

The settings app updates the settings database with the timeout value
selected by the user.
See:
http://developer.android.com/reference/android/provider/Settings.System.html#SCREEN_OFF_TIMEOUT

This value is read by PowerManagerService.java
http://www.netmite.com/android/mydroid/frameworks/base/services/java/com/android/server/PowerManagerService.java

It looks like it uses a state machine to transition between bright<-
>dim<->off states.
See setTimeoutLocked() and the Runnable that calls it , and
setScreenOffTimeoutsLocked() for the poke handling that happens when
you press a key to keep the screen on for some additional time.

To get a better idea of the flow, it might be useful to enable the
prints under mSpew. You can check the value of the class variables
easily.


On Aug 11, 2:13 am, Pratik Prajapati <pratik.prajap...@gmail.com>
wrote:
> Hi,
>
> Can any one please let me know, how/where the screen timeout is implemented?
>
> Its like when user does not press any key or touch on the screen, the screen
> goes timed out and turn off the back light or reduces the brightness!
>
> Regards,
> Pratik

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to