mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Merge branch 'social-backup-poc' into remote-wipe-poc
* social-backup-poc: Fix bug with qrCodeRead flag Fix bug with qrCodeRead flag
This commit is contained in:
@@ -127,6 +127,7 @@ public class CustodianReturnShardViewModel extends AndroidViewModel
|
||||
public void onQrCodeDecoded(Result result) {
|
||||
LOG.info("Got result from decoder");
|
||||
if (qrCodeRead) return;
|
||||
qrCodeRead = true;
|
||||
try {
|
||||
byte[] payloadBytes = result.getText().getBytes(ISO_8859_1);
|
||||
if (LOG.isLoggable(INFO))
|
||||
@@ -197,9 +198,6 @@ public class CustodianReturnShardViewModel extends AndroidViewModel
|
||||
public void onStateChanged(CustodianTask.State state) {
|
||||
this.state.postValue(state);
|
||||
// Connecting, SendingShard, ReceivingAck, Success, Failure
|
||||
if (state instanceof CustodianTask.State.SendingShard) {
|
||||
qrCodeRead = true;
|
||||
}
|
||||
}
|
||||
|
||||
public MutableLiveEvent<Boolean> getErrorTryAgain() {
|
||||
|
||||
@@ -25,7 +25,6 @@ import static java.util.logging.Logger.getLogger;
|
||||
public class CustodianTaskImpl extends ReturnShardTaskImpl
|
||||
implements CustodianTask {
|
||||
|
||||
private boolean cancelled = false;
|
||||
private Observer observer;
|
||||
private final ClientHelper clientHelper;
|
||||
private InetSocketAddress remoteSocketAddress;
|
||||
@@ -54,7 +53,6 @@ public class CustodianTaskImpl extends ReturnShardTaskImpl
|
||||
|
||||
@Override
|
||||
public void cancel() {
|
||||
cancelled = true;
|
||||
if (socket != null && !socket.isClosed()) {
|
||||
try {
|
||||
socket.close();
|
||||
|
||||
Reference in New Issue
Block a user