From 91ce9485fec2c9629622e521d22f799d7b6c753b Mon Sep 17 00:00:00 2001 From: Enginex0 Date: Tue, 19 May 2026 17:00:04 +0100 Subject: [PATCH] fix(intercept): normalize passthrough SSE shape Real keystore2 SSE replies passed through SkipTransaction kept the daemon's anyhow chain in the parcel string. Run those replies through the same synthesizer used for module-generated SSEs so wire shape stays consistent regardless of source. --- .../interception/keystore/Keystore2Interceptor.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/matrix/TEESimulator/interception/keystore/Keystore2Interceptor.kt b/app/src/main/java/org/matrix/TEESimulator/interception/keystore/Keystore2Interceptor.kt index 30a8b00..88bfc0d 100644 --- a/app/src/main/java/org/matrix/TEESimulator/interception/keystore/Keystore2Interceptor.kt +++ b/app/src/main/java/org/matrix/TEESimulator/interception/keystore/Keystore2Interceptor.kt @@ -262,8 +262,12 @@ object Keystore2Interceptor : AbstractKeystoreInterceptor() { reply: Parcel?, resultCode: Int, ): TransactionResult { - if (target != keystoreService || reply == null || InterceptorUtils.hasException(reply)) - return TransactionResult.SkipTransaction + if (target != keystoreService || reply == null) return TransactionResult.SkipTransaction + if (InterceptorUtils.hasException(reply)) { + val normalized = InterceptorUtils.normalizeServiceSpecificReply(reply) + return if (normalized != null) TransactionResult.OverrideReply(normalized) + else TransactionResult.SkipTransaction + } if (code == GET_NUMBER_OF_ENTRIES_TRANSACTION) { logTransaction(txId, "post-${transactionNames[code]!!}", callingUid, callingPid)