本文整理汇总了Java中com.raizlabs.android.dbflow.config.FlowManager.destroy方法的典型用法代码示例。如果您正苦于以下问题:Java FlowManager.destroy方法的具体用法?Java FlowManager.destroy怎么用?Java FlowManager.destroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.raizlabs.android.dbflow.config.FlowManager
的用法示例。
在下文中一共展示了FlowManager.destroy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prepare
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
public static TestComponent prepare(App app) {
FlowManager.destroy();
resetSingleton(FlowManager.class, "mDatabaseHolder");
ApplicationModule appModule = new ApplicationModule(app) {
@Override
public EventBus eventBus() {
return new LoggingBus();
}
@Provides
@Singleton
public JobManager jobManager() {
JobManager mock = mock(JobManager.class);
when(mock.addJob(any(Job.class))).thenReturn(1L);
return mock;
}
};
TestComponent testComponent = DaggerTestComponent.builder()
.testApplicationModule(new TestApplicationModule())
.applicationModule(appModule)
.build();
testComponent.appContext().deleteDatabase(DemoDatabase.NAME + ".db");
FlowManager.init(app);
testComponent.feedModel().clear();
testComponent.loggingBus().clear();
return testComponent;
}
示例2: teardown
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@After
public void teardown() {
executors.shutdown();
// DBFlow doesn't automatically close its database handle when a test ends.
// https://github.com/robolectric/robolectric/issues/1890#issuecomment-218880541
FlowManager.destroy();
}
示例3: dispose
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
public static void dispose() {
// ThreadPool
stopThreadPool();
// Network
stopRequestQueue();
// DB Flow destroy
FlowManager.destroy();
APPLICATION = null;
}
示例4: pullFromDB
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
private void pullFromDB(Context context,
InputStream inputStream) throws IOException {
Log.d(TAG, "Copy Database from assets started");
FlowManager.destroy();
copyDBFromAssets(inputStream);
reinitializeDbFlowDatabases(context);
Log.d(TAG, "Copy Database from assets finished");
}
示例5: tearDown
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@Override
public void tearDown() throws Exception {
FlowManager.destroy();
getTargetContext().deleteDatabase(FlowDatabase.NAME + ".db");
super.tearDown();
}
示例6: onTerminate
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@Override
public void onTerminate() {
super.onTerminate();
FlowManager.destroy();
application = null;
context = null;
}
示例7: getResponseObject
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@Override
public TrackerExportResponse getResponseObject() {
FlowManager.init(this);
List<TrackedEntityInstance> trackedEntityInstances = new Select().from(TrackedEntityInstance.class).queryList();
List<Enrollment> enrollments = new Select().from(Enrollment.class).queryList();
List<Event> events = new Select().from(Event.class).queryList();
FlowManager.destroy();
return TrackerExportResponse.build(trackedEntityInstances, enrollments, events);
}
示例8: DBTearDown
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
private void DBTearDown() {
FlowManager.destroy();
}
示例9: teardown
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@After
public void teardown() {
// DBFlow doesn't automatically close its database handle when a test ends.
// https://github.com/robolectric/robolectric/issues/1890#issuecomment-218880541
FlowManager.destroy();
}
示例10: onTerminate
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@Override
public void onTerminate() {
FlowManager.destroy();
super.onTerminate();
}
示例11: tearDown
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@After
public void tearDown() throws Exception {
FlowManager.getDatabase(AppDatabase.NAME).reset(RuntimeEnvironment.application);
FlowManager.destroy();
}
示例12: after
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@After
public void after() {
scroballDB.clear();
FlowManager.destroy();
}
示例13: onTerminate
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@Override
public void onTerminate() {
super.onTerminate(); //必须先调用父类的同名方法
FlowManager.destroy(); //释放DbFlow这个第三方数据库使用的所有资源
}
示例14: freeDatabase
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
private void freeDatabase() {
FlowManager.destroy();
}
示例15: onTerminate
import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@Override
public void onTerminate() {
super.onTerminate();
FlowManager.destroy();
}