Loading security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp +10 −1 Original line number Diff line number Diff line Loading @@ -328,7 +328,16 @@ std::optional<vector<uint8_t>> KeyMintAidlTestBase::getModuleHash() { * 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__; if (!is_gsi_image()) { return AidlVersion() >= 2 && get_vendor_api_level() >= AVendorSupport_getVendorApiLevelOf(__ANDROID_API_T__); } else { // The device ID properties may not be set properly when testing earlier implementations // under GSI, e.g. `ro.product.<id>` is overridden by the GSI image, but the // `ro.product.vendor.<id>` value (which does survive GSI installation) was not set. return AidlVersion() >= 2 && get_vendor_api_level() >= AVendorSupport_getVendorApiLevelOf(__ANDROID_API_U__); } } /** Loading Loading
security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp +10 −1 Original line number Diff line number Diff line Loading @@ -328,7 +328,16 @@ std::optional<vector<uint8_t>> KeyMintAidlTestBase::getModuleHash() { * 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__; if (!is_gsi_image()) { return AidlVersion() >= 2 && get_vendor_api_level() >= AVendorSupport_getVendorApiLevelOf(__ANDROID_API_T__); } else { // The device ID properties may not be set properly when testing earlier implementations // under GSI, e.g. `ro.product.<id>` is overridden by the GSI image, but the // `ro.product.vendor.<id>` value (which does survive GSI installation) was not set. return AidlVersion() >= 2 && get_vendor_api_level() >= AVendorSupport_getVendorApiLevelOf(__ANDROID_API_U__); } } /** Loading