mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
45 lines
1.2 KiB
Java
45 lines
1.2 KiB
Java
package briarproject.activity;
|
|
|
|
import android.app.Application;
|
|
|
|
import org.briarproject.CoreModule;
|
|
import org.briarproject.android.AndroidComponent;
|
|
import org.briarproject.android.AndroidEagerSingletons;
|
|
import org.briarproject.android.AppModule;
|
|
import org.briarproject.android.BriarApplication;
|
|
import org.briarproject.android.DaggerAndroidComponent;
|
|
|
|
import java.util.logging.Logger;
|
|
|
|
/**
|
|
* This class only exists to avoid static initialisation of ACRA
|
|
*/
|
|
public class TestBriarApplication extends Application
|
|
implements BriarApplication {
|
|
|
|
private static final Logger LOG =
|
|
Logger.getLogger(TestBriarApplication.class.getName());
|
|
|
|
private AndroidComponent applicationComponent;
|
|
|
|
@Override
|
|
public void onCreate() {
|
|
super.onCreate();
|
|
LOG.info("Created");
|
|
|
|
applicationComponent = DaggerAndroidComponent.builder()
|
|
.appModule(new AppModule(this))
|
|
.build();
|
|
|
|
// We need to load the eager singletons directly after making the
|
|
// dependency graphs
|
|
CoreModule.initEagerSingletons(applicationComponent);
|
|
AndroidEagerSingletons.initEagerSingletons(applicationComponent);
|
|
}
|
|
|
|
@Override
|
|
public AndroidComponent getApplicationComponent() {
|
|
return applicationComponent;
|
|
}
|
|
}
|