potential nfc bug fix

This commit is contained in:
2026-05-29 18:58:35 +05:00
parent 0efe833e40
commit cc15ab1c6c
@@ -28,7 +28,7 @@ class BmlHostCardEmulatorService : HostApduService() {
INS_SELECT -> handleSelect(apdu)
INS_GPO -> handleGpo()
INS_READ -> handleReadRecord()
else -> SW_UNKNOWN_ERROR
else -> SW_INS_NOT_SUPPORTED
}
}
@@ -141,7 +141,7 @@ class BmlHostCardEmulatorService : HostApduService() {
val data: ByteArray?
init {
if (raw.size < 4) {
if (raw.size < 5) {
isError = true; ins = -1; data = null
} else {
isError = false
@@ -168,6 +168,7 @@ class BmlHostCardEmulatorService : HostApduService() {
private const val SW_OK_HEX = "9000"
private val SW_UNKNOWN_ERROR = byteArrayOf(0x6F.toByte(), 0x00.toByte())
private val SW_INS_NOT_SUPPORTED = byteArrayOf(0x6D.toByte(), 0x00.toByte())
@Volatile var activeToken: BmlWalletToken? = null
@Volatile var onTransactionComplete: ((success: Boolean) -> Unit)? = null