Android: Enumerate all wake locks in the system
<p>I have trouble with an Android app keeping a partial wake lock on my system; so I'd like to write an app that keeps an eye on the bad app and kills its partial wake lock shortly after it acquires one.</p>

<p><a href="http://google.com/codesearch/p?hl=en#uX1GffpyOZk/core/java/android/os/PowerManager.java&amp;q=android.os.PowerManager&amp;d=4" rel="nofollow">android.os.PowerManager</a> is used to acquire and release wake locks but I don't see any way to get all wake locks in the system; even if I got access to its <code>IPowerManager mService</code> variable, that service doesn't release a wake lock without the <code>IBinder</code> object associated with the wake lock.</p>

<p>So I'm stuck. How do I proceed? Is this even possible?</p>
