@Implements(value=android.os.MessageQueue.class) public class ShadowMessageQueue extends Object
Robolectric puts Messages into the scheduler queue instead of sending them to be handled on a separate thread. Messages 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(Message msg,
long when) |
Message |
getHead() |
org.robolectric.util.Scheduler |
getScheduler() |
static void |
nativeDestroy(int ptr) |
protected static void |
nativeDestroy(long ptr) |
static Number |
nativeInit() |
static boolean |
nativeIsIdling(int ptr) |
protected static boolean |
nativeIsIdling(long ptr) |
protected void |
removeSyncBarrier(int token) |
void |
reset() |
void |
setHead(Message msg) |
void |
setScheduler(org.robolectric.util.Scheduler scheduler) |
@HiddenApi @Implementation public static 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 org.robolectric.util.Scheduler getScheduler()
public void setScheduler(org.robolectric.util.Scheduler scheduler)
public Message getHead()
public void setHead(Message msg)
public void reset()
@Implementation protected boolean enqueueMessage(Message msg, long when)
@Implementation @HiddenApi protected void removeSyncBarrier(int token)