ShadowLegacyMessage, ShadowPausedMessage@Implements(value=android.os.Message.class, shadowPicker=Picker.class) public abstract class ShadowMessage extends Object
Message.
Different shadow implementations will be used depending on the current LooperMode. See
ShadowLegacyMessage and ShadowPausedMessage for details.
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ShadowMessage.Picker |
The shadow Picker for this class
|
| Constructor | Description |
|---|---|
ShadowMessage() |
| Modifier and Type | Method | Description |
|---|---|---|
abstract Message |
getNext() |
Convenience method to provide getter access to the private field
Message.next. |
abstract void |
recycleUnchecked() |
Exposes the package-private
Message.recycleUnchecked() |
static void |
reset() |
Resets the static state of the
Message class by
emptying the message pool. |
abstract void |
setNext(Message next) |
Convenience method to provide setter access to the private field
Message.next. |
abstract void |
setScheduledRunnable(Runnable r) |
Stores the
Runnable instance that has been scheduled to invoke this message. |
public abstract void recycleUnchecked()
Message.recycleUnchecked()public abstract void setScheduledRunnable(Runnable r)
Runnable instance that has been scheduled to invoke this message. This is
called when the message is enqueued by ShadowLegacyMessageQueue.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.
#if ($api >= 21) * @see #recycleUnchecked() #else * @see #recycle() #end
Only supported in LooperMode.Mode.LEGACY.
public abstract Message getNext()
Message.next.
Only supported in LooperMode.Mode.LEGACY
setNext(Message)public abstract void setNext(Message next)
Message.next.
Only supported in LooperMode.Mode.LEGACY
next - the new next message for the current message.getNext()