Loading audio/core/all-versions/vts/functional/7.0/PolicyConfig.h +2 −7 Original line number Diff line number Diff line Loading @@ -41,15 +41,10 @@ using Module = Modules::Module; class PolicyConfig { public: explicit PolicyConfig(const std::string& configFileName) : mConfigFileName{configFileName}, mFilePath{findExistingConfigurationFile(mConfigFileName)}, mConfig{xsd::read(mFilePath.c_str())} { init(); } PolicyConfig(const std::string& configPath, const std::string& configFileName) : mConfigFileName{configFileName}, mFilePath{configPath + "/" + mConfigFileName}, mFilePath{configPath.empty() ? findExistingConfigurationFile(mConfigFileName) : configPath + "/" + mConfigFileName}, mConfig{xsd::read(mFilePath.c_str())} { init(); } Loading automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp +31 −9 Original line number Diff line number Diff line Loading @@ -81,10 +81,18 @@ using ::android::base::StartsWith; using ::android::base::StringPrintf; // In order to test large number of vehicle property configs, we might generate additional fake // property config start from this ID. Note these fake properties are for getAllPropertyConfigs // testing only. constexpr int32_t STARTING_VENDOR_CODE_PROPERTIES_FOR_TEST = 0x5000; constexpr int32_t NUMBER_OF_TEST_VENDOR_CODES = 0x3000; // property config start from this ID. These fake properties are for getPropertyList, // getPropertiesAsync, and setPropertiesAsync. // 0x21403000 constexpr int32_t STARTING_VENDOR_CODE_PROPERTIES_FOR_TEST = 0x3000 | toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR) | toInt(testpropertyutils_impl::VehicleArea::GLOBAL) | toInt(testpropertyutils_impl::VehiclePropertyType::INT32); // 0x21405000 constexpr int32_t ENDING_VENDOR_CODE_PROPERTIES_FOR_TEST = 0x5000 | toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR) | toInt(testpropertyutils_impl::VehicleArea::GLOBAL) | toInt(testpropertyutils_impl::VehiclePropertyType::INT32); // The directory for default property configuration file. // For config file format, see impl/default_config/config/README.md. constexpr char DEFAULT_CONFIG_DIR[] = "/vendor/etc/automotive/vhalconfig/"; Loading Loading @@ -590,6 +598,17 @@ FakeVehicleHardware::ValueResultType FakeVehicleHardware::maybeGetSpecialValue( int32_t propId = value.prop; ValueResultType result; if (propId >= STARTING_VENDOR_CODE_PROPERTIES_FOR_TEST && propId < ENDING_VENDOR_CODE_PROPERTIES_FOR_TEST) { *isSpecialValue = true; result = mValuePool->obtainInt32(/* value= */ 5); result.value()->prop = propId; result.value()->areaId = 0; result.value()->timestamp = elapsedRealtimeNano(); return result; } if (mFakeUserHal->isSupported(propId)) { *isSpecialValue = true; return getUserHalProp(value); Loading Loading @@ -706,6 +725,12 @@ VhalResult<void> FakeVehicleHardware::maybeSetSpecialValue(const VehiclePropValu VehiclePropValuePool::RecyclableType updatedValue; int32_t propId = value.prop; if (propId >= STARTING_VENDOR_CODE_PROPERTIES_FOR_TEST && propId < ENDING_VENDOR_CODE_PROPERTIES_FOR_TEST) { *isSpecialValue = true; return {}; } if (mFakeUserHal->isSupported(propId)) { *isSpecialValue = true; return setUserHalProp(value); Loading Loading @@ -829,7 +854,6 @@ VhalResult<void> FakeVehicleHardware::setValue(const VehiclePropValue& value) { // Here we are just updating mValuePool. bool isSpecialValue = false; auto setSpecialValueResult = maybeSetSpecialValue(value, &isSpecialValue); if (isSpecialValue) { if (!setSpecialValueResult.ok()) { return StatusError(getErrorCode(setSpecialValueResult)) Loading Loading @@ -1038,11 +1062,9 @@ std::string FakeVehicleHardware::parseErrMsg(std::string fieldName, std::string void FakeVehicleHardware::generateVendorConfigs( std::vector<VehiclePropConfig>& outAllConfigs) const { for (int i = STARTING_VENDOR_CODE_PROPERTIES_FOR_TEST; i < STARTING_VENDOR_CODE_PROPERTIES_FOR_TEST + NUMBER_OF_TEST_VENDOR_CODES; i++) { i < ENDING_VENDOR_CODE_PROPERTIES_FOR_TEST; i++) { VehiclePropConfig config; config.prop = i | toInt(propertyutils_impl::VehiclePropertyGroup::VENDOR) | toInt(propertyutils_impl::VehicleArea::GLOBAL) | toInt(propertyutils_impl::VehiclePropertyType::INT32); config.prop = i; config.access = VehiclePropertyAccess::READ_WRITE; outAllConfigs.push_back(config); } Loading automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl +0 −6 Original line number Diff line number Diff line Loading @@ -4384,12 +4384,6 @@ enum VehicleProperty { /*********************************************************************************************** * Start of ADAS Properties * * Android is not a safety critical system and is provided as is without any timing guarantees, * representations or warranties. OEMs implementing these properties, and clients using these * properties should ensure they complete any necessary safety reviews, in accordance with * industry standards, to ensure the use of these APIs do not negatively impact driver safety. * Use of any Google APIs will be at the OEM's sole risk. * * Allocate IDs in range of 0x1000 (inclusive) to 0x1100 (exclusive) for ADAS properties **********************************************************************************************/ Loading security/rkp/README.md +18 −0 Original line number Diff line number Diff line Loading @@ -291,6 +291,24 @@ available on the device it should appear in the certificate request as the leaf of a DKCertChain in AdditionalDKSignatures (see [CertificateRequest](#certificaterequest)). #### Mode The Open Profile for DICE specifies four possible modes with the most important mode being `normal`. A certificate must only set the mode to `normal` when all of the following conditions are met when loading and verifying the software component that is being described by the certificate: * verified boot with anti-rollback protection is enabled * only the verified boot authorities for production images are enabled * debug ports, fuses or other debug facilities are disabled * device booted software from the normal primary source e.g. internal flash If any of these conditions are not met then it is recommended to explicitly acknowledge this fact by using the `debug` mode. The mode should never be `not configured`. #### Configuration descriptor The Open Profile for DICE allows for an arbitrary configuration descriptor. For BCC entries, this configuration descriptor is a CBOR map with the following optional fields. If no fields are relevant, an empty map should be encoded. Loading wifi/1.6/vts/functional/wifi_rtt_controller_hidl_test.cpp +26 −14 Original line number Diff line number Diff line Loading @@ -78,6 +78,13 @@ class WifiRttControllerHidlTest : public ::testing::TestWithParam<std::string> { virtual void TearDown() override { stopWifi(GetInstanceName()); } RttCapabilities getRttCapabilities() { std::pair<WifiStatus, RttCapabilities> status_and_caps; status_and_caps = HIDL_INVOKE(wifi_rtt_controller_, getCapabilities_1_6); EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_caps.first.code); return status_and_caps.second; } // A simple test implementation of WifiRttControllerEventCallback. class WifiRttControllerEventCallback : public ::testing::VtsHalHidlTargetCallbackBase<WifiRttControllerHidlTest>, Loading Loading @@ -151,12 +158,9 @@ TEST_P(WifiRttControllerHidlTest, RegisterEventCallback_1_6) { * This test case tests the two sided ranging - 802.11mc FTM protocol. */ TEST_P(WifiRttControllerHidlTest, Request2SidedRangeMeasurement) { std::pair<WifiStatus, RttCapabilities> status_and_caps; // Get the Capabilities status_and_caps = HIDL_INVOKE(wifi_rtt_controller_, getCapabilities_1_6); EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_caps.first.code); if (!status_and_caps.second.rttFtmSupported) { RttCapabilities capabilities = getRttCapabilities(); if (!capabilities.rttFtmSupported) { GTEST_SKIP() << "Skipping two sided RTT since driver/fw doesn't support"; } std::vector<RttConfig> configs; Loading Loading @@ -196,19 +200,16 @@ TEST_P(WifiRttControllerHidlTest, Request2SidedRangeMeasurement) { * rangeRequest_1_6 */ TEST_P(WifiRttControllerHidlTest, RangeRequest_1_6) { std::pair<WifiStatus, RttCapabilities> status_and_caps; // Get the Capabilities status_and_caps = HIDL_INVOKE(wifi_rtt_controller_, getCapabilities_1_6); EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_caps.first.code); if (!status_and_caps.second.rttOneSidedSupported) { RttCapabilities capabilities = getRttCapabilities(); if (!capabilities.rttOneSidedSupported) { GTEST_SKIP() << "Skipping one sided RTT since driver/fw doesn't support"; } // Get the highest support preamble int preamble = 1; status_and_caps.second.preambleSupport >>= 1; while (status_and_caps.second.preambleSupport != 0) { status_and_caps.second.preambleSupport >>= 1; capabilities.preambleSupport >>= 1; while (capabilities.preambleSupport != 0) { capabilities.preambleSupport >>= 1; preamble <<= 1; } std::vector<RttConfig> configs; Loading Loading @@ -259,9 +260,14 @@ TEST_P(WifiRttControllerHidlTest, GetCapabilities_1_6) { * getResponderInfo_1_6 */ TEST_P(WifiRttControllerHidlTest, GetResponderInfo_1_6) { std::pair<WifiStatus, RttResponder> status_and_info; // Get the capabilities RttCapabilities capabilities = getRttCapabilities(); if (!capabilities.responderSupported) { GTEST_SKIP() << "Skipping because responder is not supported"; } // Invoke the call std::pair<WifiStatus, RttResponder> status_and_info; status_and_info = HIDL_INVOKE(wifi_rtt_controller_, getResponderInfo_1_6); EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_info.first.code); } Loading @@ -270,6 +276,12 @@ TEST_P(WifiRttControllerHidlTest, GetResponderInfo_1_6) { * enableResponder_1_6 */ TEST_P(WifiRttControllerHidlTest, EnableResponder_1_6) { // Get the capabilities RttCapabilities capabilities = getRttCapabilities(); if (!capabilities.responderSupported) { GTEST_SKIP() << "Skipping because responder is not supported"; } std::pair<WifiStatus, RttResponder> status_and_info; int cmdId = 55; WifiChannelInfo channelInfo; Loading Loading
audio/core/all-versions/vts/functional/7.0/PolicyConfig.h +2 −7 Original line number Diff line number Diff line Loading @@ -41,15 +41,10 @@ using Module = Modules::Module; class PolicyConfig { public: explicit PolicyConfig(const std::string& configFileName) : mConfigFileName{configFileName}, mFilePath{findExistingConfigurationFile(mConfigFileName)}, mConfig{xsd::read(mFilePath.c_str())} { init(); } PolicyConfig(const std::string& configPath, const std::string& configFileName) : mConfigFileName{configFileName}, mFilePath{configPath + "/" + mConfigFileName}, mFilePath{configPath.empty() ? findExistingConfigurationFile(mConfigFileName) : configPath + "/" + mConfigFileName}, mConfig{xsd::read(mFilePath.c_str())} { init(); } Loading
automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp +31 −9 Original line number Diff line number Diff line Loading @@ -81,10 +81,18 @@ using ::android::base::StartsWith; using ::android::base::StringPrintf; // In order to test large number of vehicle property configs, we might generate additional fake // property config start from this ID. Note these fake properties are for getAllPropertyConfigs // testing only. constexpr int32_t STARTING_VENDOR_CODE_PROPERTIES_FOR_TEST = 0x5000; constexpr int32_t NUMBER_OF_TEST_VENDOR_CODES = 0x3000; // property config start from this ID. These fake properties are for getPropertyList, // getPropertiesAsync, and setPropertiesAsync. // 0x21403000 constexpr int32_t STARTING_VENDOR_CODE_PROPERTIES_FOR_TEST = 0x3000 | toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR) | toInt(testpropertyutils_impl::VehicleArea::GLOBAL) | toInt(testpropertyutils_impl::VehiclePropertyType::INT32); // 0x21405000 constexpr int32_t ENDING_VENDOR_CODE_PROPERTIES_FOR_TEST = 0x5000 | toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR) | toInt(testpropertyutils_impl::VehicleArea::GLOBAL) | toInt(testpropertyutils_impl::VehiclePropertyType::INT32); // The directory for default property configuration file. // For config file format, see impl/default_config/config/README.md. constexpr char DEFAULT_CONFIG_DIR[] = "/vendor/etc/automotive/vhalconfig/"; Loading Loading @@ -590,6 +598,17 @@ FakeVehicleHardware::ValueResultType FakeVehicleHardware::maybeGetSpecialValue( int32_t propId = value.prop; ValueResultType result; if (propId >= STARTING_VENDOR_CODE_PROPERTIES_FOR_TEST && propId < ENDING_VENDOR_CODE_PROPERTIES_FOR_TEST) { *isSpecialValue = true; result = mValuePool->obtainInt32(/* value= */ 5); result.value()->prop = propId; result.value()->areaId = 0; result.value()->timestamp = elapsedRealtimeNano(); return result; } if (mFakeUserHal->isSupported(propId)) { *isSpecialValue = true; return getUserHalProp(value); Loading Loading @@ -706,6 +725,12 @@ VhalResult<void> FakeVehicleHardware::maybeSetSpecialValue(const VehiclePropValu VehiclePropValuePool::RecyclableType updatedValue; int32_t propId = value.prop; if (propId >= STARTING_VENDOR_CODE_PROPERTIES_FOR_TEST && propId < ENDING_VENDOR_CODE_PROPERTIES_FOR_TEST) { *isSpecialValue = true; return {}; } if (mFakeUserHal->isSupported(propId)) { *isSpecialValue = true; return setUserHalProp(value); Loading Loading @@ -829,7 +854,6 @@ VhalResult<void> FakeVehicleHardware::setValue(const VehiclePropValue& value) { // Here we are just updating mValuePool. bool isSpecialValue = false; auto setSpecialValueResult = maybeSetSpecialValue(value, &isSpecialValue); if (isSpecialValue) { if (!setSpecialValueResult.ok()) { return StatusError(getErrorCode(setSpecialValueResult)) Loading Loading @@ -1038,11 +1062,9 @@ std::string FakeVehicleHardware::parseErrMsg(std::string fieldName, std::string void FakeVehicleHardware::generateVendorConfigs( std::vector<VehiclePropConfig>& outAllConfigs) const { for (int i = STARTING_VENDOR_CODE_PROPERTIES_FOR_TEST; i < STARTING_VENDOR_CODE_PROPERTIES_FOR_TEST + NUMBER_OF_TEST_VENDOR_CODES; i++) { i < ENDING_VENDOR_CODE_PROPERTIES_FOR_TEST; i++) { VehiclePropConfig config; config.prop = i | toInt(propertyutils_impl::VehiclePropertyGroup::VENDOR) | toInt(propertyutils_impl::VehicleArea::GLOBAL) | toInt(propertyutils_impl::VehiclePropertyType::INT32); config.prop = i; config.access = VehiclePropertyAccess::READ_WRITE; outAllConfigs.push_back(config); } Loading
automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl +0 −6 Original line number Diff line number Diff line Loading @@ -4384,12 +4384,6 @@ enum VehicleProperty { /*********************************************************************************************** * Start of ADAS Properties * * Android is not a safety critical system and is provided as is without any timing guarantees, * representations or warranties. OEMs implementing these properties, and clients using these * properties should ensure they complete any necessary safety reviews, in accordance with * industry standards, to ensure the use of these APIs do not negatively impact driver safety. * Use of any Google APIs will be at the OEM's sole risk. * * Allocate IDs in range of 0x1000 (inclusive) to 0x1100 (exclusive) for ADAS properties **********************************************************************************************/ Loading
security/rkp/README.md +18 −0 Original line number Diff line number Diff line Loading @@ -291,6 +291,24 @@ available on the device it should appear in the certificate request as the leaf of a DKCertChain in AdditionalDKSignatures (see [CertificateRequest](#certificaterequest)). #### Mode The Open Profile for DICE specifies four possible modes with the most important mode being `normal`. A certificate must only set the mode to `normal` when all of the following conditions are met when loading and verifying the software component that is being described by the certificate: * verified boot with anti-rollback protection is enabled * only the verified boot authorities for production images are enabled * debug ports, fuses or other debug facilities are disabled * device booted software from the normal primary source e.g. internal flash If any of these conditions are not met then it is recommended to explicitly acknowledge this fact by using the `debug` mode. The mode should never be `not configured`. #### Configuration descriptor The Open Profile for DICE allows for an arbitrary configuration descriptor. For BCC entries, this configuration descriptor is a CBOR map with the following optional fields. If no fields are relevant, an empty map should be encoded. Loading
wifi/1.6/vts/functional/wifi_rtt_controller_hidl_test.cpp +26 −14 Original line number Diff line number Diff line Loading @@ -78,6 +78,13 @@ class WifiRttControllerHidlTest : public ::testing::TestWithParam<std::string> { virtual void TearDown() override { stopWifi(GetInstanceName()); } RttCapabilities getRttCapabilities() { std::pair<WifiStatus, RttCapabilities> status_and_caps; status_and_caps = HIDL_INVOKE(wifi_rtt_controller_, getCapabilities_1_6); EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_caps.first.code); return status_and_caps.second; } // A simple test implementation of WifiRttControllerEventCallback. class WifiRttControllerEventCallback : public ::testing::VtsHalHidlTargetCallbackBase<WifiRttControllerHidlTest>, Loading Loading @@ -151,12 +158,9 @@ TEST_P(WifiRttControllerHidlTest, RegisterEventCallback_1_6) { * This test case tests the two sided ranging - 802.11mc FTM protocol. */ TEST_P(WifiRttControllerHidlTest, Request2SidedRangeMeasurement) { std::pair<WifiStatus, RttCapabilities> status_and_caps; // Get the Capabilities status_and_caps = HIDL_INVOKE(wifi_rtt_controller_, getCapabilities_1_6); EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_caps.first.code); if (!status_and_caps.second.rttFtmSupported) { RttCapabilities capabilities = getRttCapabilities(); if (!capabilities.rttFtmSupported) { GTEST_SKIP() << "Skipping two sided RTT since driver/fw doesn't support"; } std::vector<RttConfig> configs; Loading Loading @@ -196,19 +200,16 @@ TEST_P(WifiRttControllerHidlTest, Request2SidedRangeMeasurement) { * rangeRequest_1_6 */ TEST_P(WifiRttControllerHidlTest, RangeRequest_1_6) { std::pair<WifiStatus, RttCapabilities> status_and_caps; // Get the Capabilities status_and_caps = HIDL_INVOKE(wifi_rtt_controller_, getCapabilities_1_6); EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_caps.first.code); if (!status_and_caps.second.rttOneSidedSupported) { RttCapabilities capabilities = getRttCapabilities(); if (!capabilities.rttOneSidedSupported) { GTEST_SKIP() << "Skipping one sided RTT since driver/fw doesn't support"; } // Get the highest support preamble int preamble = 1; status_and_caps.second.preambleSupport >>= 1; while (status_and_caps.second.preambleSupport != 0) { status_and_caps.second.preambleSupport >>= 1; capabilities.preambleSupport >>= 1; while (capabilities.preambleSupport != 0) { capabilities.preambleSupport >>= 1; preamble <<= 1; } std::vector<RttConfig> configs; Loading Loading @@ -259,9 +260,14 @@ TEST_P(WifiRttControllerHidlTest, GetCapabilities_1_6) { * getResponderInfo_1_6 */ TEST_P(WifiRttControllerHidlTest, GetResponderInfo_1_6) { std::pair<WifiStatus, RttResponder> status_and_info; // Get the capabilities RttCapabilities capabilities = getRttCapabilities(); if (!capabilities.responderSupported) { GTEST_SKIP() << "Skipping because responder is not supported"; } // Invoke the call std::pair<WifiStatus, RttResponder> status_and_info; status_and_info = HIDL_INVOKE(wifi_rtt_controller_, getResponderInfo_1_6); EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_info.first.code); } Loading @@ -270,6 +276,12 @@ TEST_P(WifiRttControllerHidlTest, GetResponderInfo_1_6) { * enableResponder_1_6 */ TEST_P(WifiRttControllerHidlTest, EnableResponder_1_6) { // Get the capabilities RttCapabilities capabilities = getRttCapabilities(); if (!capabilities.responderSupported) { GTEST_SKIP() << "Skipping because responder is not supported"; } std::pair<WifiStatus, RttResponder> status_and_info; int cmdId = 55; WifiChannelInfo channelInfo; Loading