Not using a WakeLock so why does the device stay awake?

by Dianne Hackborn » Wed, 14 Apr 2010 15:36:31 GMT

Sponsored Links
 Use this to see what wake locks are being held in user space:

adb shell dumpsys power

Note that the device never goes to sleep while plugged in to USB.  Also the
system will never hold a wake lock for you just because you have an activity
or service running.  You can have it do so for you in an activity via
FLAG_KEEP_SCREEN_ON in a window, and the alarm manager will temporarily hold
one for you while sending an alarm broadcast to a broadcast receiver.


Not using a WakeLock so why does the device stay awake?

by Dianne Hackborn » Fri, 23 Apr 2010 01:59:22 GMT

 It is possible for the kernel to hold wake locks for various reasons.  If
you want to see what was holding wake locks while you were unplugged, use
"adb shell dumpsys batteryinfo" and look at the last set of stats (this is
the raw information used to generate the battery usage UI).  However the
kernel wake lock information is extremely hard to understand, and
unfortunately I can't say for sure off-hand how to interpret it. :}


Sponsored Links

Other Threads

1. deleteOnExit when and how does an Android JVM exit

I am making some temporary files on the android and need want to call
deleteOnExit to help guarantee proper cleanup. This call will clean up
when the JVM exits. It dawned on me that I do not understand the
Application life cycle.
1) Does each application run in a separate JVM?
2) When does an Application's JVM exit - assuming there is one JVM per
3) Can a JVM exit when the application is running but being suspended
by the OS?


2. Application invisible in Market from Nexus One. Please test.

"As far as you know."

No, the Nexus One does NOT have that screen resolution. If that's all
you support, that's probably your problem right there.

Please read the SDK documentation on supporting different screen
resolutions and maintaining future compatibility. It's not just Nexus
One you'll have problems with.

I wouldn't even consider HVGA to be "normal" in this day and age, but
rather "minimal".


3. Problem with setting progress indeterminate when using webView

4. How to use setText() in class that extends TextView?

5. AVRCP FF/RWD in Eclair

6. Handling "Key Press" from Soft Keyboard in EditText

7. Changing orientation from portrait to landscape