Merge "omx: validate only standard OMX roles" into sc-dev
diff --git a/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h b/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h
index aa7fd8e..340903a 100644
--- a/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h
+++ b/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h
@@ -1390,6 +1390,9 @@
config.channelMask.value(channelMask);
auto ret = stream->setAudioProperties(config);
EXPECT_TRUE(ret.isOk());
+ if (ret == Result::NOT_SUPPORTED) {
+ GTEST_SKIP() << "setAudioProperties is not supported";
+ }
EXPECT_EQ(Result::OK, ret)
<< profile.format << "; " << sampleRate << "; " << channelMask;
}
diff --git a/gnss/aidl/vts/gnss_hal_test_cases.cpp b/gnss/aidl/vts/gnss_hal_test_cases.cpp
index 5964f81..b484f9c 100644
--- a/gnss/aidl/vts/gnss_hal_test_cases.cpp
+++ b/gnss/aidl/vts/gnss_hal_test_cases.cpp
@@ -252,7 +252,6 @@
for (const auto& correlationVector : measurement.correlationVectors) {
ASSERT_GE(correlationVector.frequencyOffsetMps, 0);
ASSERT_GT(correlationVector.samplingWidthM, 0);
- ASSERT_GE(correlationVector.samplingStartM, 0);
ASSERT_TRUE(correlationVector.magnitude.size() > 0);
for (const auto& magnitude : correlationVector.magnitude) {
ASSERT_TRUE(magnitude >= -32768 && magnitude <= 32767);
diff --git a/gnss/common/utils/default/Utils.cpp b/gnss/common/utils/default/Utils.cpp
index d136448..23e39b2 100644
--- a/gnss/common/utils/default/Utils.cpp
+++ b/gnss/common/utils/default/Utils.cpp
@@ -221,7 +221,7 @@
aidl::android::hardware::gnss::CorrelationVector correlationVector2 = {
.frequencyOffsetMps = 20,
.samplingWidthM = 30,
- .samplingStartM = 0,
+ .samplingStartM = -10,
.magnitude = {0, 3000, 5000, 3000, 0, 0, 1000, 0}};
measurement.correlationVectors = {correlationVector1, correlationVector2};
measurement.flags |= GnssMeasurement::HAS_CORRELATION_VECTOR;
diff --git a/keymaster/4.0/vts/functional/KeymasterHidlTest.cpp b/keymaster/4.0/vts/functional/KeymasterHidlTest.cpp
index d0ad433..d326334 100644
--- a/keymaster/4.0/vts/functional/KeymasterHidlTest.cpp
+++ b/keymaster/4.0/vts/functional/KeymasterHidlTest.cpp
@@ -21,6 +21,7 @@
#include <android-base/logging.h>
#include <android/hidl/manager/1.0/IServiceManager.h>
+#include <cutils/properties.h>
#include <keymasterV4_0/key_param_output.h>
#include <keymasterV4_0/keymaster_utils.h>
@@ -685,6 +686,9 @@
case Algorithm::EC:
return {224, 384, 521};
case Algorithm::AES:
+ // The HAL language was clarified to exclude AES key sizes of 192 for StrongBox
+ // instances on devices launched on API Level 31 and above.
+ if (property_get_int32("ro.board.first_api_level", 0) < 31) return {};
return {192};
default:
return {};
diff --git a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
index 2241735..4e81e71 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
@@ -96,7 +96,8 @@
*
* o AES
*
- * - 128 and 256-bit keys
+ * - TRUSTED_ENVIRONMENT IKeyMintDevices must support 128, 192 and 256-bit keys.
+ * STRONGBOX IKeyMintDevices must only support 128 and 256-bit keys.
* - CBC, CTR, ECB and GCM modes. The GCM mode must not allow the use of tags smaller than 96
* bits or nonce lengths other than 96 bits.
* - CBC and ECB modes must support unpadded and PKCS7 padding modes. With no padding CBC and
diff --git a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
index a312723..26ed344 100644
--- a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
+++ b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
@@ -312,6 +312,7 @@
AuthorizationSet hw_enforced = HwEnforcedAuthorizations(attested_key_characteristics);
AuthorizationSet sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics);
+ ASSERT_GT(cert_chain_list[i].size(), 0);
EXPECT_TRUE(verify_attestation_record("foo", "bar", sw_enforced, hw_enforced, SecLevel(),
cert_chain_list[i][0].encodedCertificate));
@@ -383,6 +384,7 @@
AuthorizationSet hw_enforced = HwEnforcedAuthorizations(attested_key_characteristics);
AuthorizationSet sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics);
+ ASSERT_GT(cert_chain_list[i].size(), 0);
EXPECT_TRUE(verify_attestation_record("foo", "bar", sw_enforced, hw_enforced, SecLevel(),
cert_chain_list[i][0].encodedCertificate));
@@ -471,6 +473,7 @@
AuthorizationSet hw_enforced = HwEnforcedAuthorizations(attested_key_characteristics);
AuthorizationSet sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics);
+ ASSERT_GT(cert_chain_list[i].size(), 0);
EXPECT_TRUE(verify_attestation_record("foo", "bar", sw_enforced, hw_enforced, SecLevel(),
cert_chain_list[i][0].encodedCertificate));