mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-21 23:29:52 +01:00
Tidy
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
package org.briarproject.briar.android.socialbackup.recover;
|
package org.briarproject.briar.android.socialbackup.recover;
|
||||||
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
@@ -24,7 +23,6 @@ import javax.inject.Inject;
|
|||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
|
|
||||||
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
|
|
||||||
import static java.util.logging.Logger.getLogger;
|
import static java.util.logging.Logger.getLogger;
|
||||||
|
|
||||||
@MethodsNotNullByDefault
|
@MethodsNotNullByDefault
|
||||||
@@ -64,6 +62,7 @@ public class OwnerReturnShardActivity extends BaseActivity
|
|||||||
}
|
}
|
||||||
viewModel.getShowQrCodeFragment().observeEvent(this, show -> {
|
viewModel.getShowQrCodeFragment().observeEvent(this, show -> {
|
||||||
if (show) {
|
if (show) {
|
||||||
|
LOG.info("Show QR code clicked");
|
||||||
viewModel.startListening();
|
viewModel.startListening();
|
||||||
showQrCodeFragment();
|
showQrCodeFragment();
|
||||||
}
|
}
|
||||||
@@ -124,7 +123,8 @@ public class OwnerReturnShardActivity extends BaseActivity
|
|||||||
|
|
||||||
private void onReturnShardStateChanged(SecretOwnerTask.State state) {
|
private void onReturnShardStateChanged(SecretOwnerTask.State state) {
|
||||||
if (state instanceof SecretOwnerTask.State.Success) {
|
if (state instanceof SecretOwnerTask.State.Success) {
|
||||||
ReturnShardPayload shardPayload = ((SecretOwnerTask.State.Success) state).getRemotePayload();
|
ReturnShardPayload shardPayload =
|
||||||
|
((SecretOwnerTask.State.Success) state).getRemotePayload();
|
||||||
boolean added = viewModel.addToShardSet(shardPayload);
|
boolean added = viewModel.addToShardSet(shardPayload);
|
||||||
Toast.makeText(this,
|
Toast.makeText(this,
|
||||||
"Success - got shard" + (added ? "" : " duplicate"),
|
"Success - got shard" + (added ? "" : " duplicate"),
|
||||||
@@ -141,7 +141,8 @@ public class OwnerReturnShardActivity extends BaseActivity
|
|||||||
Toast.LENGTH_LONG).show();
|
Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
} catch (FormatException e) {
|
} catch (FormatException e) {
|
||||||
LOG.warning("Unable to parse backup" + e.getMessage() + e.getStackTrace().toString());
|
LOG.warning("Unable to parse backup" + e.getMessage() +
|
||||||
|
e.getStackTrace().toString());
|
||||||
Toast.makeText(this,
|
Toast.makeText(this,
|
||||||
"Unable to parse backup",
|
"Unable to parse backup",
|
||||||
Toast.LENGTH_LONG).show();
|
Toast.LENGTH_LONG).show();
|
||||||
|
|||||||
Reference in New Issue
Block a user