Add tests for scanning QR codes

This commit is contained in:
Alexander Bakker 2022-08-04 21:31:53 +02:00
parent 3b715d58cf
commit 5f12eae678
5 changed files with 173 additions and 18 deletions

View file

@ -2,8 +2,6 @@ package com.beemdevelopment.aegis.helpers;
import static android.graphics.ImageFormat.YUV_420_888;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.util.Size;
@ -70,7 +68,7 @@ public class QrCodeAnalyzer implements ImageAnalysis.Analyzer {
Result result = reader.decode(bitmap, hints);
if (_listener != null) {
new Handler(Looper.getMainLooper()).post(() -> _listener.onQrCodeDetected(result));
_listener.onQrCodeDetected(result);
}
} catch (NotFoundException ignored) {