mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 13:19:52 +01:00
Progress spinners weren't shown when retrying invitation connections.
Fixes issue #3611959.
This commit is contained in:
@@ -174,11 +174,9 @@ implements InvitationListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void reset(AddContactView view) {
|
void reset(AddContactView view) {
|
||||||
// Note: localAuthorId is not reset
|
// Don't reset localAuthorId, networkName or useBluetooth
|
||||||
task = null;
|
task = null;
|
||||||
taskHandle = -1;
|
taskHandle = -1;
|
||||||
networkName = null;
|
|
||||||
useBluetooth = false;
|
|
||||||
localInvitationCode = -1;
|
localInvitationCode = -1;
|
||||||
localConfirmationCode = remoteConfirmationCode = -1;
|
localConfirmationCode = remoteConfirmationCode = -1;
|
||||||
connectionFailed = false;
|
connectionFailed = false;
|
||||||
@@ -255,12 +253,14 @@ implements InvitationListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void remoteInvitationCodeEntered(int code) {
|
void remoteInvitationCodeEntered(int code) {
|
||||||
setView(new ConnectionView(this));
|
|
||||||
if(localAuthorId == null) throw new IllegalStateException();
|
if(localAuthorId == null) throw new IllegalStateException();
|
||||||
if(localInvitationCode == -1) throw new IllegalStateException();
|
if(localInvitationCode == -1) throw new IllegalStateException();
|
||||||
|
setView(new ConnectionView(this));
|
||||||
task = invitationTaskFactory.createTask(localAuthorId,
|
task = invitationTaskFactory.createTask(localAuthorId,
|
||||||
localInvitationCode, code);
|
localInvitationCode, code);
|
||||||
taskHandle = referenceManager.putReference(task, InvitationTask.class);
|
taskHandle = referenceManager.putReference(task, InvitationTask.class);
|
||||||
|
// FIXME: Why can't the activity clean up the reference? If the task
|
||||||
|
// has a reference to the activity (as a listener), it won't be GCed
|
||||||
task.addListener(AddContactActivity.this);
|
task.addListener(AddContactActivity.this);
|
||||||
task.addListener(new ReferenceCleaner(referenceManager, taskHandle));
|
task.addListener(new ReferenceCleaner(referenceManager, taskHandle));
|
||||||
task.connect();
|
task.connect();
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ public class ConnectionView extends AddContactView {
|
|||||||
code.setText(String.format("%06d", localCode));
|
code.setText(String.format("%06d", localCode));
|
||||||
addView(code);
|
addView(code);
|
||||||
|
|
||||||
// FIXME: These spinners don't appear when trying again after a failure
|
|
||||||
String networkName = container.getNetworkName();
|
String networkName = container.getNetworkName();
|
||||||
if(networkName != null) {
|
if(networkName != null) {
|
||||||
LinearLayout innerLayout = new LinearLayout(ctx);
|
LinearLayout innerLayout = new LinearLayout(ctx);
|
||||||
@@ -53,8 +52,7 @@ public class ConnectionView extends AddContactView {
|
|||||||
addView(innerLayout);
|
addView(innerLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean useBluetooth = container.getUseBluetooth();
|
if(container.getUseBluetooth()) {
|
||||||
if(useBluetooth) {
|
|
||||||
LinearLayout innerLayout = new LinearLayout(ctx);
|
LinearLayout innerLayout = new LinearLayout(ctx);
|
||||||
innerLayout.setOrientation(HORIZONTAL);
|
innerLayout.setOrientation(HORIZONTAL);
|
||||||
innerLayout.setGravity(CENTER);
|
innerLayout.setGravity(CENTER);
|
||||||
|
|||||||
Reference in New Issue
Block a user