From 63789ba29d385f8eb88c091251b2d0772dacb96f Mon Sep 17 00:00:00 2001 From: Enginex0 Date: Sun, 22 Mar 2026 00:05:34 +0100 Subject: [PATCH] fix(attestation): restore presence-based findBoolean for KeyMint tags KeyMint boolean tags (NO_AUTH_REQUIRED, CALLER_NONCE, etc.) use presence-based semantics: tag exists = true, tag absent = null. The .value?.boolValue approach fails on some AIDL implementations where the boolValue field isn't populated despite the tag being present, silently dropping boolean tags from attestations. --- .../org/matrix/TEESimulator/attestation/KeyMintAttestation.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/matrix/TEESimulator/attestation/KeyMintAttestation.kt b/app/src/main/java/org/matrix/TEESimulator/attestation/KeyMintAttestation.kt index 92b0d30..e96d238 100644 --- a/app/src/main/java/org/matrix/TEESimulator/attestation/KeyMintAttestation.kt +++ b/app/src/main/java/org/matrix/TEESimulator/attestation/KeyMintAttestation.kt @@ -157,7 +157,7 @@ data class KeyMintAttestation( /** Maps to AOSP field = Integer */ private fun Array.findBoolean(tag: Int): Boolean? = - this.find { it.tag == tag }?.value?.boolValue + if (this.any { it.tag == tag }) true else null /** Maps to AOSP field = Integer */ private fun Array.findInteger(tag: Int): Int? =