From 13efbaf9bb5ddcbeff08da568971321cc87d4f54 Mon Sep 17 00:00:00 2001 From: r-ca Date: Mon, 29 Jan 2024 05:48:26 +0900 Subject: [PATCH] =?UTF-8?q?=E6=9C=80=E5=88=9D=E3=81=AE=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E3=82=92=E8=87=AA=E5=8B=95=E3=81=A7=E9=96=8B=E3=81=8F=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/scanner/ScannerManagerActivity.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerManagerActivity.java b/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerManagerActivity.java index ec7da90e..b7d7b9a5 100644 --- a/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerManagerActivity.java +++ b/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerManagerActivity.java @@ -266,7 +266,17 @@ public class ScannerManagerActivity extends AppCompatActivity { dialog.show(); document.getDocument(documentId).thenAccept((documentDetail) -> { DocumentProcessor documentProcessor = documentProcessorFactory.create(documentDetail); - documentProcessor.updatePageAtIndex(croppedImages.get(0), index); + if (croppedImages.size() != 1) { + logger.error(TAG, "croppedImages.size() != 1"); + logger.e_code("d8e2b8c9-9b7e-4b7e-9e1e-9e3b8b8b8b8b"); + return; + } + if (croppedImages.get(0) == null) { + logger.error(TAG, "croppedImages.get(0) == null"); + logger.e_code("d8e2b8c9-9b7e-4b7e-9e1e-9e3b8b8b8b8b"); + return; + } +// documentProcessor.updatePageAtIndex(croppedImages.get(0), index); logger.debug(TAG, "documentProcessor.getPageCount(): " + documentProcessor.getPageCount() + ", documentDetail.getPages().size(): " + documentDetail.getPages().size()); document.updateDocument(documentProcessor.getDocumentDetail()).join(); @@ -316,6 +326,8 @@ public class ScannerManagerActivity extends AppCompatActivity { resultView.addView(resultImageView); } + + selectedImage.setImageBitmap(resultImages.get(0)); } } \ No newline at end of file