de.unikassel.android.sdcframework.util
Class WakeLockHolder

Package class diagram package WakeLockHolder
java.lang.Object
  extended by de.unikassel.android.sdcframework.util.WakeLockHolder

public class WakeLockHolder
extends Object

A simple class to maintain a wake lock instance


Field Summary
private  PowerManager.WakeLock wakeLock
          The wake lock
 
Constructor Summary
WakeLockHolder(Context context)
          Constructor
 
Method Summary
 void acquireWakeLock()
          Does acquire the wake lock
private  PowerManager.WakeLock createWakeLock(Context context)
          Method to create a wake lock
 PowerManager.WakeLock getWakeLock()
          Getter for the wake lock
 void releaseWakeLock()
          Does release the wake lock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wakeLock

private final PowerManager.WakeLock wakeLock
The wake lock

Constructor Detail

WakeLockHolder

public WakeLockHolder(Context context)
Constructor

Parameters:
context - the context
Method Detail

getWakeLock

public PowerManager.WakeLock getWakeLock()
Getter for the wake lock

Returns:
the wake lock

createWakeLock

private final PowerManager.WakeLock createWakeLock(Context context)
Method to create a wake lock

Parameters:
context - the context
Returns:
the wake lock

releaseWakeLock

public final void releaseWakeLock()
Does release the wake lock


acquireWakeLock

public final void acquireWakeLock()
Does acquire the wake lock