From 52b3fcf5ad44626ea55d656d17ee128078071fdc Mon Sep 17 00:00:00 2001 From: 5ec1cff Date: Tue, 16 Jul 2024 21:54:36 +0800 Subject: [PATCH] ignore exceptions from remote --- .../java/io/github/a13e300/tricky_store/KeystoreInterceptor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/src/main/java/io/github/a13e300/tricky_store/KeystoreInterceptor.kt b/service/src/main/java/io/github/a13e300/tricky_store/KeystoreInterceptor.kt index ce9f8c9..9014084 100644 --- a/service/src/main/java/io/github/a13e300/tricky_store/KeystoreInterceptor.kt +++ b/service/src/main/java/io/github/a13e300/tricky_store/KeystoreInterceptor.kt @@ -66,10 +66,10 @@ object KeystoreInterceptor : BinderInterceptor() { resultCode: Int ): Result { if (target != keystore || code != getKeyEntryTransaction || reply == null) return Skip + if (kotlin.runCatching { reply.readException() }.exceptionOrNull() != null) return Skip val p = Parcel.obtain() Logger.d("intercept post $target uid=$callingUid pid=$callingPid dataSz=${data.dataSize()} replySz=${reply.dataSize()}") try { - reply.readException() val response = reply.readTypedObject(KeyEntryResponse.CREATOR) val chain = Utils.getCertificateChain(response) if (chain != null) {