mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 14:02:49 +00:00
Improve overall exception handling and error feedback to the user
The main goals of this patch are to: - Improve the exception handling in Aegis and the way we present errors messages to the user when they occur. - Write exception stack traces to the log in more places, so that the ADB logs we ask for from our users when reporting bugs become more useful. - Reduce the amount of times we throw a RuntimeException, particularly when an Android Keystore operation fails. Achieving the above goals ended up resulting in a very large refactor. The intro and unlock flow of the app need to be retested entirely.
This commit is contained in:
parent
499f930086
commit
cda78c56c5
21 changed files with 544 additions and 465 deletions
|
@ -107,7 +107,6 @@ public class ScannerActivity extends AegisActivity implements ZXingScannerView.R
|
|||
@Override
|
||||
public void handleResult(Result rawResult) {
|
||||
try {
|
||||
// parse google auth uri
|
||||
GoogleAuthInfo info = GoogleAuthInfo.parseUri(rawResult.getText().trim());
|
||||
VaultEntry entry = new VaultEntry(info);
|
||||
|
||||
|
@ -116,10 +115,11 @@ public class ScannerActivity extends AegisActivity implements ZXingScannerView.R
|
|||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
} catch (GoogleAuthInfoException e) {
|
||||
Toast.makeText(this, getString(R.string.read_qr_error), Toast.LENGTH_SHORT).show();
|
||||
e.printStackTrace();
|
||||
Dialogs.showErrorDialog(this, R.string.read_qr_error, e, (dialog, which) -> {
|
||||
_scannerView.resumeCameraPreview(this);
|
||||
});
|
||||
}
|
||||
|
||||
_scannerView.resumeCameraPreview(this);
|
||||
}
|
||||
|
||||
private void updateCameraIcon() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue