Moved briar-android tests into their respective packages.

This commit is contained in:
akwizgran
2016-08-03 13:46:30 +01:00
parent 9a32a13767
commit 4a4366078a
7 changed files with 8 additions and 26 deletions

View File

@@ -0,0 +1,39 @@
package org.briarproject.android;
import android.app.Application;
import org.briarproject.CoreModule;
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;
}
}