mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-04-23 23:39:14 +00:00
Don't process QR code if ScannerActivity is finished
This commit is contained in:
parent
74ecdec637
commit
12683e3ff0
1 changed files with 5 additions and 0 deletions
|
@ -178,6 +178,10 @@ public class ScannerActivity extends AegisActivity implements QrCodeAnalyzer.Lis
|
|||
@Override
|
||||
public void onQrCodeDetected(Result result) {
|
||||
new Handler(getMainLooper()).post(() -> {
|
||||
if (isFinishing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_analysis != null) {
|
||||
try {
|
||||
Uri uri = Uri.parse(result.getText().trim());
|
||||
|
@ -190,6 +194,7 @@ public class ScannerActivity extends AegisActivity implements QrCodeAnalyzer.Lis
|
|||
e.printStackTrace();
|
||||
|
||||
unbindPreview(_cameraProvider);
|
||||
|
||||
Dialogs.showErrorDialog(this,
|
||||
e.isPhoneFactor() ? R.string.read_qr_error_phonefactor : R.string.read_qr_error,
|
||||
e, ((dialog, which) -> bindPreview(_cameraProvider)));
|
||||
|
|
Loading…
Add table
Reference in a new issue