@Implements(android.os.PowerManager.WakeLock.class) public static class ShadowPowerManager.ShadowWakeLock extends Object
Constructor | Description |
---|---|
ShadowWakeLock() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
acquire() |
|
protected void |
acquire(long timeout) |
|
String |
getTag() |
Returns the tag.
|
int |
getTimesHeld() |
Returns how many times the wakelock was held.
|
WorkSource |
getWorkSource() |
|
protected boolean |
isHeld() |
|
boolean |
isReferenceCounted() |
Retrieves if the wake lock is reference counted or not
|
protected void |
release(int flags) |
Releases the wake lock.
|
protected void |
setReferenceCounted(boolean value) |
|
protected void |
setWorkSource(WorkSource ws) |
@Implementation protected void acquire()
@Implementation protected void acquire(long timeout)
@Implementation protected void release(int flags)
flags
are ignored.@Implementation protected boolean isHeld()
public boolean isReferenceCounted()
@Implementation protected void setReferenceCounted(boolean value)
@Implementation protected void setWorkSource(WorkSource ws)
public WorkSource getWorkSource()
public int getTimesHeld()
@HiddenApi @Implementation(minSdk=26) public String getTag()