Back to project page MySms.
The source code is released under:
Apache License
If you think the Android project MySms listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.henningta.mysms; /*ww w . j av a2s . c om*/ import android.content.Context; import android.os.PowerManager; public abstract class WakeLocker { private static PowerManager.WakeLock wakeLock; public static void acquire(Context context) { PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, ""); wakeLock.acquire(); } public static void release() { if (wakeLock != null) wakeLock.release(); wakeLock = null; } }