mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 05:09:53 +01:00
Use new UI/DB interfaces for adding contacts.
This commit is contained in:
@@ -14,6 +14,7 @@ import org.briarproject.api.crypto.CryptoComponent;
|
|||||||
import org.briarproject.api.db.DatabaseComponent;
|
import org.briarproject.api.db.DatabaseComponent;
|
||||||
import org.briarproject.api.db.DbException;
|
import org.briarproject.api.db.DbException;
|
||||||
import org.briarproject.api.identity.AuthorId;
|
import org.briarproject.api.identity.AuthorId;
|
||||||
|
import org.briarproject.api.identity.IdentityManager;
|
||||||
import org.briarproject.api.identity.LocalAuthor;
|
import org.briarproject.api.identity.LocalAuthor;
|
||||||
import org.briarproject.api.invitation.InvitationListener;
|
import org.briarproject.api.invitation.InvitationListener;
|
||||||
import org.briarproject.api.invitation.InvitationState;
|
import org.briarproject.api.invitation.InvitationState;
|
||||||
@@ -58,6 +59,7 @@ implements InvitationListener {
|
|||||||
|
|
||||||
// Fields that are accessed from background threads must be volatile
|
// Fields that are accessed from background threads must be volatile
|
||||||
@Inject private volatile DatabaseComponent db;
|
@Inject private volatile DatabaseComponent db;
|
||||||
|
@Inject private volatile IdentityManager identityManager;
|
||||||
private volatile boolean leaveBluetoothEnabled = true;
|
private volatile boolean leaveBluetoothEnabled = true;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -239,7 +241,8 @@ implements InvitationListener {
|
|||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
Collection<LocalAuthor> authors = db.getLocalAuthors();
|
Collection<LocalAuthor> authors =
|
||||||
|
identityManager.getLocalAuthors();
|
||||||
long duration = System.currentTimeMillis() - now;
|
long duration = System.currentTimeMillis() - now;
|
||||||
if (LOG.isLoggable(INFO))
|
if (LOG.isLoggable(INFO))
|
||||||
LOG.info("Loading authors took " + duration + " ms");
|
LOG.info("Loading authors took " + duration + " ms");
|
||||||
|
|||||||
Reference in New Issue
Block a user