本文整理匯總了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();
}