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. Access sim card via code in Android

Hi All

I am quite new to Android.
I develope telephony tests that checks SIM functionality
Can somebody provide code examples of how we can access sim card via
What Android APIs can I use to read contacks to write sim etc.
I have an access to internal apis (that are not a part of Android)



2. Querying the standard browser

Is it possible to interface with the standard browser?

I would like to know what urls are open in all browser windows/tabs,
maybe the history for each window/tab and finally the position(what
text is visible, scrollbar percent etc.) of each window.

Is this possible?

I've looked at the tutorials for webview, but it only seems to be able
to display a new url. If I could iterate all open windows/tabs as
webviews I think I could get the information out that I'm looking for.



3. Subscription

4. howto update all after language change programmatically

5. OnLongClick not available for GridView?

6. Showing image from Url

7. Signing in to Google for Google Document access