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