I have a question for Joe and a report for Monroe.

First the report. For Android 0.9 beta and 1.0, I have gotten the
simulator to generally shut off (blank screen) by clicking off Dev
Tools->Development Settings->Keep screen on while plugged in. After a
minute of no user activity the screen blanks. You then have to click a
button to get the lock screen, and then click the Menu button to
release the lock screen. I have tested that using the Java code
snippet in android.os.PowerManager to acquire a full lock or a
SCREEN_DIM_WAKE_LOCK prevents the screen blanking.

Now for Joe: Is there any way in user Java code to be able to read the
KeyEvent or countdown timer to know how long ago the user pressed a
key or did something  under all activities?

--Gershon


On Aug 10, 12:27 am, Joe Onorato <[EMAIL PROTECTED]> wrote:
> Hi, I did most of the user space power management functions in
> Android.
>
> The big thing that you didn't notice is that there are two classes 
> ofwakelocks -- kernel and user space.  All of the user space partialwakelocks 
> funnel through one partialwakelock, called
> PowerManagerService.  The fullwakelocks and user activity countdown
> timer are all implemented in java and call on to /sys/android_power/
> request_state, which turns the screen on and off (and implicitly, also
> keeps the CPU on).  The kernel still has /sys/android_power/
> acquire_full_wake_lock, but it is not used.
>
> By the time the KeyEventwakelockis released, someone has either
> called userActivity on the power manager, which resets the countdown
> timer, or they haven't, which means that the device should notwake
> up.
>
> -joe

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Android Internals" group.
To post to this group, send email to android-internals@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/android-internals?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to