Added eager singletons and made some fixes

This commit is contained in:
Ernir Erlingsson
2016-03-08 22:35:42 +01:00
parent 5aba1d79f1
commit 9af3ce123a
17 changed files with 70 additions and 10 deletions

View File

@@ -6,6 +6,8 @@ import java.util.logging.Logger;
import android.app.Application;
import android.content.Context;
import org.briarproject.event.EventModule;
public class BriarApplication extends Application {
private static final Logger LOG =
@@ -16,7 +18,7 @@ public class BriarApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
LOG.info("Created");
LOG.info("Application Created");
UncaughtExceptionHandler oldHandler =
Thread.getDefaultUncaughtExceptionHandler();
Context ctx = getApplicationContext();
@@ -27,6 +29,10 @@ public class BriarApplication extends Application {
.appModule(new AppModule(this))
.androidModule(new AndroidModule())
.build();
// We need to load the eager singletons directly after making the
// dependency graph
AndroidModule.injectEager(applicationComponent);
}
public AndroidComponent getApplicationComponent() {