mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 14:02:49 +00:00
Add tests for scanning QR codes
This commit is contained in:
parent
3b715d58cf
commit
5f12eae678
5 changed files with 173 additions and 18 deletions
|
@ -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) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue