mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Switched Roboguice/Guice out for Dagger 2
This commit is contained in:
@@ -11,6 +11,8 @@ public class BriarApplication extends Application {
|
||||
private static final Logger LOG =
|
||||
Logger.getLogger(BriarApplication.class.getName());
|
||||
|
||||
private AndroidComponent applicationComponent;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
@@ -20,5 +22,14 @@ public class BriarApplication extends Application {
|
||||
Context ctx = getApplicationContext();
|
||||
CrashHandler newHandler = new CrashHandler(ctx, oldHandler);
|
||||
Thread.setDefaultUncaughtExceptionHandler(newHandler);
|
||||
|
||||
applicationComponent = DaggerAndroidComponent.builder()
|
||||
.appModule(new AppModule(this))
|
||||
.androidModule(new AndroidModule())
|
||||
.build();
|
||||
}
|
||||
|
||||
public AndroidComponent getApplicationComponent() {
|
||||
return applicationComponent;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user