use of org.robolectric.shadows.ShadowMessageQueue in project android_packages_apps_Settings by omnirom.
the class ShadowPackageMonitor method setupBackgroundThreadScheduler.
private static void setupBackgroundThreadScheduler() {
ShadowMessageQueue shadowMessageQueue = ((ShadowMessageQueue) ShadowExtractor.extract(BackgroundThread.getHandler().getLooper().getQueue()));
shadowMessageQueue.setScheduler(ShadowApplication.getInstance().getBackgroundThreadScheduler());
}
use of org.robolectric.shadows.ShadowMessageQueue in project android_packages_apps_Settings by crdroidandroid.
the class ShadowPackageMonitor method setupBackgroundThreadScheduler.
private static void setupBackgroundThreadScheduler() {
ShadowMessageQueue shadowMessageQueue = ((ShadowMessageQueue) ShadowExtractor.extract(BackgroundThread.getHandler().getLooper().getQueue()));
shadowMessageQueue.setScheduler(ShadowApplication.getInstance().getBackgroundThreadScheduler());
}
use of org.robolectric.shadows.ShadowMessageQueue in project android_packages_apps_Settings by SudaMod.
the class ShadowPackageMonitor method setupBackgroundThreadScheduler.
private static void setupBackgroundThreadScheduler() {
ShadowMessageQueue shadowMessageQueue = ((ShadowMessageQueue) ShadowExtractor.extract(BackgroundThread.getHandler().getLooper().getQueue()));
shadowMessageQueue.setScheduler(ShadowApplication.getInstance().getBackgroundThreadScheduler());
}
use of org.robolectric.shadows.ShadowMessageQueue in project platform_packages_apps_Settings by BlissRoms.
the class ShadowPackageMonitor method setupBackgroundThreadScheduler.
private static void setupBackgroundThreadScheduler() {
ShadowMessageQueue shadowMessageQueue = ((ShadowMessageQueue) ShadowExtractor.extract(BackgroundThread.getHandler().getLooper().getQueue()));
shadowMessageQueue.setScheduler(ShadowApplication.getInstance().getBackgroundThreadScheduler());
}
use of org.robolectric.shadows.ShadowMessageQueue in project RxAndroid by ReactiveX.
the class HandlerSchedulerTest method workerScheduleSetAsync.
@Test
public void workerScheduleSetAsync() {
ShadowMessageQueue mainMessageQueue = shadowOf(Looper.getMainLooper().getQueue());
Worker worker = scheduler.createWorker();
worker.schedule(new Runnable() {
@Override
public void run() {
}
});
Message message = mainMessageQueue.getHead();
assertEquals(async, message.isAsynchronous());
}
Aggregations