Semi-encapsulated the core/api dependency graphs and created a proper structure to load eager singletons

This commit is contained in:
Ernir Erlingsson
2016-03-10 22:31:08 +01:00
parent 10764d727b
commit 6f233070fe
28 changed files with 483 additions and 225 deletions

View File

@@ -12,7 +12,7 @@ import android.os.IBinder;
import android.support.v4.app.NotificationCompat;
import org.briarproject.R;
import org.briarproject.api.android.AndroidExecutor;
import org.briarproject.api.android.PlatformExecutor;
import org.briarproject.api.db.DatabaseConfig;
import org.briarproject.api.lifecycle.LifecycleManager;
import org.briarproject.api.lifecycle.LifecycleManager.StartResult;
@@ -48,7 +48,7 @@ public class BriarService extends Service {
// Fields that are accessed from background threads must be volatile
@Inject protected volatile LifecycleManager lifecycleManager;
@Inject protected volatile AndroidExecutor androidExecutor;
@Inject protected volatile PlatformExecutor platformExecutor;
private volatile boolean started = false;
@Override
@@ -106,7 +106,7 @@ public class BriarService extends Service {
}
private void showStartupFailureNotification(final StartResult result) {
androidExecutor.execute(new Runnable() {
platformExecutor.execute(new Runnable() {
public void run() {
NotificationCompat.Builder b =
new NotificationCompat.Builder(BriarService.this);