From 2f186054707c195ede2d14b95a0497d91cc0f5c1 Mon Sep 17 00:00:00 2001 From: septs Date: Wed, 26 Feb 2025 21:50:22 +0800 Subject: [PATCH] revert: partial code --- .../src/main/java/net/typeblog/lpac_jni/ApduInterface.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/lpac-jni/src/main/java/net/typeblog/lpac_jni/ApduInterface.kt b/libs/lpac-jni/src/main/java/net/typeblog/lpac_jni/ApduInterface.kt index 3689363..75a6905 100644 --- a/libs/lpac-jni/src/main/java/net/typeblog/lpac_jni/ApduInterface.kt +++ b/libs/lpac-jni/src/main/java/net/typeblog/lpac_jni/ApduInterface.kt @@ -17,10 +17,10 @@ interface ApduInterface { */ val valid: Boolean - fun withLogicalChannel(aid: ByteArray, callback: ((ByteArray) -> ByteArray) -> T): T { + fun withLogicalChannel(aid: ByteArray, cb: ((ByteArray) -> ByteArray) -> T): T { val handle = logicalChannelOpen(aid) return try { - callback { tx -> transmit(handle, tx) } + cb { transmit(handle, it) } } finally { logicalChannelClose(handle) }