@Implements(value=android.os.MessageQueue.class) public class ShadowMessageQueue extends java.lang.Object
Robolectric puts Message
s into the scheduler queue instead of sending them to be handled on a separate thread. Message
s that are scheduled to be dispatched can be triggered by calling ShadowLooper.idleMainLooper()
.
ShadowLooper
Constructor and Description |
---|
ShadowMessageQueue() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
enqueueMessage(android.os.Message msg,
long when) |
android.os.Message |
getHead() |
Scheduler |
getScheduler() |
static void |
nativeDestroy(int ptr) |
protected static void |
nativeDestroy(long ptr) |
static java.lang.Number |
nativeInit() |
static boolean |
nativeIsIdling(int ptr) |
protected static boolean |
nativeIsIdling(long ptr) |
protected void |
removeSyncBarrier(int token) |
void |
reset() |
void |
setHead(android.os.Message msg) |
void |
setScheduler(Scheduler scheduler) |
@HiddenApi @Implementation public static java.lang.Number nativeInit()
@HiddenApi @Implementation(minSdk=18, maxSdk=20) public static void nativeDestroy(int ptr)
@Implementation(minSdk=21) protected static void nativeDestroy(long ptr)
@HiddenApi @Implementation(minSdk=19, maxSdk=20) public static boolean nativeIsIdling(int ptr)
@Implementation(minSdk=21, maxSdk=22) protected static boolean nativeIsIdling(long ptr)
public Scheduler getScheduler()
public void setScheduler(Scheduler scheduler)
public android.os.Message getHead()
public void setHead(android.os.Message msg)
public void reset()
@Implementation protected boolean enqueueMessage(android.os.Message msg, long when)
@Implementation @HiddenApi protected void removeSyncBarrier(int token)