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 shadow
.
MessageQueue for
invalid reference
LooperMode.Mode.LEGACY
In
Robolectric puts invalid reference
LooperMode.Mode.LEGACYMessages 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().
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowMessageQueue
ShadowMessageQueue.Picker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanenqueueMessage(Message msg, long when) getHead()Retrieves the current Message at the top of the queue.org.robolectric.util.SchedulerReturn this queue's Scheduler.protected static voidnativeDestroy(long ptr) static longprotected static booleannativeIsIdling(long ptr) protected voidremoveSyncBarrier(int token) voidreset()Reset the messageQueue state.voidSets the current Message at the top of the queue.voidsetScheduler(org.robolectric.util.Scheduler scheduler) Set this queue's Scheduler.
-
Constructor Details
-
ShadowLegacyMessageQueue
public ShadowLegacyMessageQueue()
-
-
Method Details
-
nativeInit
@HiddenApi @Implementation public static long nativeInit() -
nativeDestroy
@Implementation protected static void nativeDestroy(long ptr) -
nativeIsIdling
@Implementation(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
.invalid reference
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
.invalid reference
LooperMode.Mode.LEGACY- Specified by:
setSchedulerin classShadowMessageQueue
-
getHead
Description copied from class:ShadowMessageQueueRetrieves the current Message at the top of the queue.Only supported in
.invalid reference
LooperMode.Mode.LEGACY- Specified by:
getHeadin classShadowMessageQueue
-
setHead
Description copied from class:ShadowMessageQueueSets the current Message at the top of the queue.Only supported in
.invalid reference
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
-
removeSyncBarrier
@Implementation @HiddenApi protected void removeSyncBarrier(int token)
-