From b2c04b20c7eff44da40a955d4444d1c3e3c6ae5f Mon Sep 17 00:00:00 2001 From: Nicklas Warming Jacobsen Date: Thu, 1 Feb 2024 09:17:27 +0100 Subject: [PATCH] conditionally call disconnect in SendResponse Signed-off-by: Nicklas Warming Jacobsen --- .../com/android/identity/wallet/transfer/TransferManager.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appholder/src/main/java/com/android/identity/wallet/transfer/TransferManager.kt b/appholder/src/main/java/com/android/identity/wallet/transfer/TransferManager.kt index 3376c2763..3318b6414 100644 --- a/appholder/src/main/java/com/android/identity/wallet/transfer/TransferManager.kt +++ b/appholder/src/main/java/com/android/identity/wallet/transfer/TransferManager.kt @@ -264,7 +264,9 @@ class TransferManager private constructor(private val context: Context) { fun sendResponse(deviceResponse: ByteArray, closeAfterSending: Boolean) { communication.sendResponse(deviceResponse, closeAfterSending) - disconnect(!closeAfterSending) + if (closeAfterSending) { + disconnect(false) + } } fun readDocumentEntries(documentName: String): DocumentElements {