From e75907254136f6e8510990d73564fe1bf8d273ca Mon Sep 17 00:00:00 2001 From: "Pranav Garg (xWF)" Date: Mon, 26 Aug 2024 20:15:23 +0000 Subject: [PATCH] Fixing isDeviceIdAttestationRequired to require both cases instead of just one Bug: 356536705 Change-Id: I15326e68fc2ea1ce9a2dfbe7498790900ebb43e4 (cherry picked from commit f74d27480798c2601f8d5e00fb00b0c69823b137) --- security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp index 433857c66a..cafed015df 100644 --- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp +++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp @@ -199,10 +199,10 @@ uint32_t KeyMintAidlTestBase::boot_patch_level() { /** * An API to determine device IDs attestation is required or not, - * which is mandatory for KeyMint version 2 or first_api_level 33 or greater. + * which is mandatory for KeyMint version 2 and first_api_level 33 or greater. */ bool KeyMintAidlTestBase::isDeviceIdAttestationRequired() { - return AidlVersion() >= 2 || property_get_int32("ro.vendor.api_level", 0) >= __ANDROID_API_T__; + return AidlVersion() >= 2 && property_get_int32("ro.vendor.api_level", 0) >= __ANDROID_API_T__; } /**