mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Include local tor properties in backup and check for remote handshake public keys
This commit is contained in:
@@ -52,9 +52,11 @@ public class RestoreAccountActivity extends BaseActivity
|
||||
showInitialFragment(RestoreAccountSetPasswordFragment.newInstance());
|
||||
} else if (state == State.DOZE) {
|
||||
showDozeFragment();
|
||||
} else if (state == State.CREATED || state == State.FAILED) {
|
||||
// TODO: Show an error if failed
|
||||
} else if (state == State.CREATED) {
|
||||
showApp();
|
||||
} else { // FAILED
|
||||
// TODO: Show an error if failed
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -114,16 +114,19 @@ class RestoreAccountViewModel extends AndroidViewModel {
|
||||
if (socialBackup == null) {
|
||||
LOG.warning("Cannot retrieve social backup");
|
||||
state.postEvent(State.FAILED);
|
||||
return;
|
||||
}
|
||||
Identity identity = socialBackup.getIdentity();
|
||||
ioExecutor.execute(() -> {
|
||||
if (accountManager.restoreAccount(identity, password)) {
|
||||
LOG.info("Restored account");
|
||||
try {
|
||||
restoreAccount.addContactsToDb();
|
||||
restoreAccount.restoreAccountWhenDatabaseReady();
|
||||
} catch (DbException e) {
|
||||
LOG.warning("Cannot retrieve social backup");
|
||||
LOG.warning("Failure processing social backup");
|
||||
e.printStackTrace();
|
||||
state.postEvent(State.FAILED);
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove partial recovery from shared preferences
|
||||
|
||||
Reference in New Issue
Block a user