@Implements(value=android.os.Message.class)
public class ShadowMessage
extends java.lang.Object
Message.| Constructor and Description |
|---|
ShadowMessage() |
| Modifier and Type | Method and Description |
|---|---|
android.os.Message |
getNext()
Convenience method to provide getter access to the private field
Message.next. |
boolean |
isInUse() |
void |
recycle() |
void |
recycleUnchecked()
Invokes
recycle(). |
static void |
reset()
Resets the static state of the
Message class by
emptying the message pool. |
void |
setNext(android.os.Message next)
Convenience method to provide setter access to the private field
Message.next. |
void |
setScheduledRunnable(java.lang.Runnable r)
Stores the
Runnable instance that has been scheduled
to invoke this message. |
@Implementation public void recycle()
public void recycleUnchecked()
recycle(). Provided for forward compatibility
with API 21.public void setScheduledRunnable(java.lang.Runnable r)
Runnable instance that has been scheduled
to invoke this message. This is called when the message is
enqueued by ShadowMessageQueue.enqueueMessage(android.os.Message, long) and is used when
the message is recycled to ensure that the correct
Runnable instance is removed from the associated scheduler.r - the Runnable instance that is scheduled to
trigger this message.recycle()@Implementation public boolean isInUse()
public android.os.Message getNext()
Message.next.setNext(Message)public void setNext(android.os.Message next)
Message.next.next - the new next message for the current message.getNext()@Resetter public static void reset()
Message class by
emptying the message pool.