mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Switched Roboguice/Guice out for Dagger 2
This commit is contained in:
@@ -17,6 +17,7 @@ import android.widget.ImageButton;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.briarproject.R;
|
||||
import org.briarproject.android.AndroidComponent;
|
||||
import org.briarproject.android.BriarActivity;
|
||||
import org.briarproject.android.util.BriarRecyclerView;
|
||||
import org.briarproject.api.FormatException;
|
||||
@@ -71,10 +72,10 @@ public class ConversationActivity extends BriarActivity
|
||||
private static final Logger LOG =
|
||||
Logger.getLogger(ConversationActivity.class.getName());
|
||||
|
||||
@Inject private CryptoComponent crypto;
|
||||
@Inject private AndroidNotificationManager notificationManager;
|
||||
@Inject private ConnectionRegistry connectionRegistry;
|
||||
@Inject @CryptoExecutor private Executor cryptoExecutor;
|
||||
@Inject protected CryptoComponent crypto;
|
||||
@Inject protected AndroidNotificationManager notificationManager;
|
||||
@Inject protected ConnectionRegistry connectionRegistry;
|
||||
@Inject @CryptoExecutor protected Executor cryptoExecutor;
|
||||
private Map<MessageId, byte[]> bodyCache = new HashMap<MessageId, byte[]>();
|
||||
private ConversationAdapter adapter = null;
|
||||
private BriarRecyclerView list = null;
|
||||
@@ -82,10 +83,10 @@ public class ConversationActivity extends BriarActivity
|
||||
private ImageButton sendButton = null;
|
||||
|
||||
// Fields that are accessed from background threads must be volatile
|
||||
@Inject private volatile ContactManager contactManager;
|
||||
@Inject private volatile MessagingManager messagingManager;
|
||||
@Inject private volatile EventBus eventBus;
|
||||
@Inject private volatile PrivateMessageFactory privateMessageFactory;
|
||||
@Inject protected volatile ContactManager contactManager;
|
||||
@Inject protected volatile MessagingManager messagingManager;
|
||||
@Inject protected volatile EventBus eventBus;
|
||||
@Inject protected volatile PrivateMessageFactory privateMessageFactory;
|
||||
private volatile GroupId groupId = null;
|
||||
private volatile ContactId contactId = null;
|
||||
private volatile String contactName = null;
|
||||
@@ -115,6 +116,11 @@ public class ConversationActivity extends BriarActivity
|
||||
sendButton.setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void injectActivity(AndroidComponent component) {
|
||||
component.inject(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
Reference in New Issue
Block a user