use of org.edx.mobile.view.common.RunnableCourseComponent in project edx-app-android by edx.
the class ViewPagerDownloadManagerTest method setUp.
@Before
public void setUp() throws Exception {
// use mockito.answer is a little inconvenience, let's use fake approach
mainComponentUI = new RunnableCourseComponent() {
@Override
public CourseComponent getCourseComponent() {
return mainComponent;
}
@Override
public void run() {
ViewPagerDownloadManager.instance.done(this, true);
}
};
prevComponentUI = new RunnableCourseComponent() {
@Override
public CourseComponent getCourseComponent() {
return prevComponent;
}
@Override
public void run() {
ViewPagerDownloadManager.instance.done(this, true);
}
};
nextComponentUI = new RunnableCourseComponent() {
@Override
public CourseComponent getCourseComponent() {
return nextComponent;
}
@Override
public void run() {
ViewPagerDownloadManager.instance.done(this, true);
}
};
otherComponentUI = new RunnableCourseComponent() {
@Override
public CourseComponent getCourseComponent() {
return otherComponent;
}
@Override
public void run() {
ViewPagerDownloadManager.instance.done(this, true);
}
};
ViewPagerDownloadManager.USING_UI_PRELOADING = true;
}
use of org.edx.mobile.view.common.RunnableCourseComponent in project edx-app-android by edx.
the class ViewPagerDownloadManager method done.
@Override
public synchronized void done(Runnable task, boolean success) {
RunnableCourseComponent runnableCourseComponent = (RunnableCourseComponent) task;
if (runnableCourseComponentWeakList.remove(runnableCourseComponent)) {
taskIsRunning = false;
tryToRunTask();
}
}
Aggregations