Package org.robolectric.shadows
Class ShadowPowerManager.ShadowWakeLock
java.lang.Object
org.robolectric.shadows.ShadowPowerManager.ShadowWakeLock
- Enclosing class:
- ShadowPowerManager
@Implements(android.os.PowerManager.WakeLock.class)
public static class ShadowPowerManager.ShadowWakeLock
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
acquire()
protected void
acquire
(long timeout) getTag()
Returns the tag.int
Returns how many times the wakelock was held.protected boolean
isHeld()
boolean
Retrieves if the wake lock is reference counted or notprotected void
release
(int flags) Releases the wake lock.protected void
setReferenceCounted
(boolean value) protected void
Sets the tag.protected void
-
Constructor Details
-
ShadowWakeLock
public ShadowWakeLock()
-
-
Method Details
-
acquire
-
acquire
-
release
Releases the wake lock. Theflags
are ignored. -
isHeld
-
isReferenceCounted
public boolean isReferenceCounted()Retrieves if the wake lock is reference counted or not- Returns:
- Is the wake lock reference counted?
-
setReferenceCounted
-
setWorkSource
-
getWorkSource
-
getTimesHeld
public int getTimesHeld()Returns how many times the wakelock was held. -
getTag
Returns the tag. -
setTag
Sets the tag.
-