mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 14:49:53 +01:00
Renamed AndroidModule to AppModule.
This commit is contained in:
@@ -28,7 +28,7 @@ import dagger.Component;
|
|||||||
@Singleton
|
@Singleton
|
||||||
@Component(modules = {
|
@Component(modules = {
|
||||||
CoreModule.class,
|
CoreModule.class,
|
||||||
AndroidModule.class,
|
AppModule.class,
|
||||||
AndroidPluginsModule.class,
|
AndroidPluginsModule.class,
|
||||||
AndroidSystemModule.class
|
AndroidSystemModule.class
|
||||||
})
|
})
|
||||||
@@ -81,5 +81,5 @@ public interface AndroidComponent extends CoreEagerSingletons {
|
|||||||
void inject(ShowQrCodeFragment fragment);
|
void inject(ShowQrCodeFragment fragment);
|
||||||
|
|
||||||
// Eager singleton load
|
// Eager singleton load
|
||||||
void inject(AndroidModule.EagerSingletons init);
|
void inject(AppModule.EagerSingletons init);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ package org.briarproject.android;
|
|||||||
public class AndroidEagerSingletons {
|
public class AndroidEagerSingletons {
|
||||||
|
|
||||||
public static void initEagerSingletons(AndroidComponent c) {
|
public static void initEagerSingletons(AndroidComponent c) {
|
||||||
c.inject(new AndroidModule.EagerSingletons());
|
c.inject(new AppModule.EagerSingletons());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import dagger.Provides;
|
|||||||
import static android.content.Context.MODE_PRIVATE;
|
import static android.content.Context.MODE_PRIVATE;
|
||||||
|
|
||||||
@Module
|
@Module
|
||||||
public class AndroidModule {
|
public class AppModule {
|
||||||
|
|
||||||
static class EagerSingletons {
|
static class EagerSingletons {
|
||||||
@Inject
|
@Inject
|
||||||
@@ -31,7 +31,7 @@ public class AndroidModule {
|
|||||||
private final Application application;
|
private final Application application;
|
||||||
private final UiCallback uiCallback;
|
private final UiCallback uiCallback;
|
||||||
|
|
||||||
public AndroidModule(Application application) {
|
public AppModule(Application application) {
|
||||||
this.application = application;
|
this.application = application;
|
||||||
uiCallback = new UiCallback() {
|
uiCallback = new UiCallback() {
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ public class BriarApplication extends Application {
|
|||||||
Thread.setDefaultUncaughtExceptionHandler(newHandler);
|
Thread.setDefaultUncaughtExceptionHandler(newHandler);
|
||||||
|
|
||||||
applicationComponent = DaggerAndroidComponent.builder()
|
applicationComponent = DaggerAndroidComponent.builder()
|
||||||
.androidModule(new AndroidModule(this))
|
.appModule(new AppModule(this))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
// We need to load the eager singletons directly after making the
|
// We need to load the eager singletons directly after making the
|
||||||
|
|||||||
Reference in New Issue
Block a user