mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Added eager singletons and made some fixes
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user