Search in sources :

Example 1 with BackgroundThread

use of com.android.internal.os.BackgroundThread in project robolectric by robolectric.

the class ShadowBackgroundThread method reset.

@Resetter
public static void reset() {
    BackgroundThread instance = ReflectionHelpers.getStaticField(BackgroundThread.class, "sInstance");
    if (instance != null) {
        instance.quit();
        ReflectionHelpers.setStaticField(BackgroundThread.class, "sInstance", null);
        ReflectionHelpers.setStaticField(BackgroundThread.class, "sHandler", null);
    }
}
Also used : BackgroundThread(com.android.internal.os.BackgroundThread) Resetter(org.robolectric.annotation.Resetter)

Aggregations

BackgroundThread (com.android.internal.os.BackgroundThread)1 Resetter (org.robolectric.annotation.Resetter)1