Package org.robolectric.shadows
Class ShadowLegacyMessageQueue
- java.lang.Object
-
- org.robolectric.shadows.ShadowMessageQueue
-
- org.robolectric.shadows.ShadowLegacyMessageQueue
-
@Implements(value=android.os.MessageQueue.class, isInAndroidSdk=false) public class ShadowLegacyMessageQueue extends ShadowMessageQueue
The shadowMessageQueueforLooperMode.Mode.LEGACY.In
LooperMode.Mode.LEGACYRobolectric putsMessages 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 callingShadowLooper.idleMainLooper().- See Also:
ShadowLooper
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowMessageQueue
ShadowMessageQueue.Picker
-
-
Constructor Summary
Constructors Constructor Description ShadowLegacyMessageQueue()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanenqueueMessage(Message msg, long when)MessagegetHead()Retrieves the current Message at the top of the queue.org.robolectric.util.SchedulergetScheduler()Return this queue's Scheduler.static voidnativeDestroy(int ptr)protected static voidnativeDestroy(long ptr)static NumbernativeInit()static booleannativeIsIdling(int ptr)protected static booleannativeIsIdling(long ptr)protected voidremoveSyncBarrier(int token)voidreset()Reset the messageQueue state.voidsetHead(Message msg)Sets the current Message at the top of the queue.voidsetScheduler(org.robolectric.util.Scheduler scheduler)Set this queue's Scheduler.
-
-
-
Method Detail
-
nativeInit
@HiddenApi @Implementation public static Number nativeInit()
-
nativeDestroy
@HiddenApi @Implementation(minSdk=18, maxSdk=20) public static void nativeDestroy(int ptr)
-
nativeDestroy
@Implementation(minSdk=21) protected static void nativeDestroy(long ptr)
-
nativeIsIdling
@HiddenApi @Implementation(minSdk=19, maxSdk=20) public static boolean nativeIsIdling(int ptr)
-
nativeIsIdling
@Implementation(minSdk=21, maxSdk=22) protected static boolean nativeIsIdling(long ptr)
-
getScheduler
public org.robolectric.util.Scheduler getScheduler()
Description copied from class:ShadowMessageQueueReturn this queue's Scheduler.Only supported in
LooperMode.Mode.LEGACY.- Specified by:
getSchedulerin classShadowMessageQueue
-
setScheduler
public void setScheduler(org.robolectric.util.Scheduler scheduler)
Description copied from class:ShadowMessageQueueSet this queue's Scheduler.Only supported in
LooperMode.Mode.LEGACY.- Specified by:
setSchedulerin classShadowMessageQueue
-
getHead
public Message getHead()
Description copied from class:ShadowMessageQueueRetrieves the current Message at the top of the queue.Only supported in
LooperMode.Mode.LEGACY.- Specified by:
getHeadin classShadowMessageQueue
-
setHead
public void setHead(Message msg)
Description copied from class:ShadowMessageQueueSets the current Message at the top of the queue.Only supported in
LooperMode.Mode.LEGACY.- Specified by:
setHeadin classShadowMessageQueue
-
reset
public void reset()
Description copied from class:ShadowMessageQueueReset the messageQueue state. Should not be called by tests - it intended for use by the Robolectric framework.- Specified by:
resetin classShadowMessageQueue
-
enqueueMessage
@Implementation protected boolean enqueueMessage(Message msg, long when)
-
removeSyncBarrier
@Implementation @HiddenApi protected void removeSyncBarrier(int token)
-
-