Handler
class. The special handling is all done by ShadowLooper
and ShadowMessageQueue
. This class has been retained for backward compatibility with the various static method implementations.@Deprecated @Implements(value=android.os.Handler.class) public class ShadowHandler extends java.lang.Object
Robolectric places posted Runnable
s into a queue instead of sending them to be handled on a separate thread. Runnable
s that are scheduled to be executed immediately can be triggered by calling idleMainLooper()
.
todo: add utility method to advance time and trigger execution of Runnables scheduled for a time in the future
Constructor and Description |
---|
ShadowHandler()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static void |
flush()
Deprecated.
use
ShadowLooper.idleMainLooper() instead |
static void |
idleMainLooper()
Deprecated.
|
static void |
runMainLooperOneTask()
Deprecated.
|
static void |
runMainLooperToEndOfTasks()
Deprecated.
|
static void |
runMainLooperToNextTask()
Deprecated.
|
@Deprecated public static void flush()
ShadowLooper.idleMainLooper()
instead@Deprecated public static void idleMainLooper()
ShadowLooper.idleMainLooper()
@Deprecated public static void runMainLooperToEndOfTasks()
@Deprecated public static void runMainLooperOneTask()
()
@Deprecated public static void runMainLooperToNextTask()
()