mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 21:29:54 +01:00
Add transports to DB during startup. #269
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
package org.briarproject.lifecycle;
|
||||
|
||||
import org.briarproject.api.db.DatabaseComponent;
|
||||
import org.briarproject.api.event.EventBus;
|
||||
import org.briarproject.api.lifecycle.LifecycleManager;
|
||||
import org.briarproject.api.lifecycle.ShutdownManager;
|
||||
import org.briarproject.api.system.Clock;
|
||||
import org.briarproject.util.OsUtils;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
@@ -15,22 +11,10 @@ import dagger.Provides;
|
||||
@Module
|
||||
public class DesktopLifecycleModule extends LifecycleModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
LifecycleManager provideLifecycleManager(Clock clock, DatabaseComponent db,
|
||||
EventBus eventBus) {
|
||||
return new LifecycleManagerImpl(clock, db, eventBus);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
ShutdownManager provideDesktopShutdownManager() {
|
||||
if (OsUtils.isWindows()) {
|
||||
return new WindowsShutdownManagerImpl();
|
||||
}
|
||||
else {
|
||||
return new ShutdownManagerImpl();
|
||||
}
|
||||
if (OsUtils.isWindows()) return new WindowsShutdownManagerImpl();
|
||||
else return new ShutdownManagerImpl();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user