Loading audio/7.1/config/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -359,6 +359,7 @@ package android.audio.policy.configuration.V7_1 { enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_GAME; enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_MEDIA; enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_NOTIFICATION; enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_NOTIFICATION_EVENT; enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE; enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_SAFETY; enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_UNKNOWN; Loading audio/7.1/config/audio_policy_configuration.xsd +1 −0 Original line number Diff line number Diff line Loading @@ -443,6 +443,7 @@ <xs:enumeration value="AUDIO_USAGE_ALARM" /> <xs:enumeration value="AUDIO_USAGE_NOTIFICATION" /> <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE" /> <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_EVENT" /> <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" /> <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" /> <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" /> Loading audio/common/all-versions/default/7.0/HidlUtils.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -485,8 +485,12 @@ status_t HidlUtils::audioGainToHal(const AudioGain& gain, struct audio_gain* hal status_t HidlUtils::audioUsageFromHal(audio_usage_t halUsage, AudioUsage* usage) { if (halUsage == AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST || halUsage == AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT || #if MAJOR_VERSION == 7 && MINOR_VERSION == 1 halUsage == AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED) { #else halUsage == AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED || halUsage == AUDIO_USAGE_NOTIFICATION_EVENT) { #endif halUsage = AUDIO_USAGE_NOTIFICATION; } *usage = audio_usage_to_string(halUsage); Loading automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h +1 −2 Original line number Diff line number Diff line Loading @@ -754,8 +754,7 @@ const std::vector<ConfigDeclaration> kVehicleProperties = { {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .configArray = {3}}, .initialValue = {.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}}}, .configArray = {3}}}, {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .access = VehiclePropertyAccess::READ_WRITE, Loading automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp +36 −37 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ using ::android::base::unexpected; using ::testing::ContainerEq; using ::testing::ContainsRegex; using ::testing::Eq; using ::testing::IsSubsetOf; using ::testing::WhenSortedBy; constexpr int INVALID_PROP_ID = 0; Loading Loading @@ -634,17 +633,17 @@ std::vector<SetSpecialValueTestCase> setSpecialValueTestCases() { }, .expectedValuesToGet = { VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::DEEP_SLEEP_EXIT)}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .status = VehiclePropertyStatus::AVAILABLE, .value.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::DEEP_SLEEP_EXIT)}, }, }, }, SetSpecialValueTestCase{ Loading @@ -659,17 +658,17 @@ std::vector<SetSpecialValueTestCase> setSpecialValueTestCases() { }, .expectedValuesToGet = { VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::HIBERNATION_EXIT)}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .status = VehiclePropertyStatus::AVAILABLE, .value.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::HIBERNATION_EXIT)}, }, }, }, SetSpecialValueTestCase{ Loading @@ -684,17 +683,17 @@ std::vector<SetSpecialValueTestCase> setSpecialValueTestCases() { }, .expectedValuesToGet = { VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::SHUTDOWN_CANCELLED)}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .status = VehiclePropertyStatus::AVAILABLE, .value.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::SHUTDOWN_CANCELLED)}, }, }, }, SetSpecialValueTestCase{ Loading @@ -709,17 +708,17 @@ std::vector<SetSpecialValueTestCase> setSpecialValueTestCases() { }, .expectedValuesToGet = { VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::WAIT_FOR_VHAL)}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .status = VehiclePropertyStatus::AVAILABLE, .value.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::WAIT_FOR_VHAL)}, }, }, }, SetSpecialValueTestCase{ Loading @@ -734,17 +733,17 @@ std::vector<SetSpecialValueTestCase> setSpecialValueTestCases() { }, .expectedValuesToGet = { VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::DEEP_SLEEP_ENTRY)}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .status = VehiclePropertyStatus::AVAILABLE, .value.int32Values = {toInt(VehicleApPowerStateReq::FINISHED), 0}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::DEEP_SLEEP_ENTRY)}, }, }, }, SetSpecialValueTestCase{ Loading @@ -759,17 +758,17 @@ std::vector<SetSpecialValueTestCase> setSpecialValueTestCases() { }, .expectedValuesToGet = { VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::HIBERNATION_ENTRY)}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .status = VehiclePropertyStatus::AVAILABLE, .value.int32Values = {toInt(VehicleApPowerStateReq::FINISHED), 0}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::HIBERNATION_ENTRY)}, }, }, }, SetSpecialValueTestCase{ Loading @@ -784,17 +783,17 @@ std::vector<SetSpecialValueTestCase> setSpecialValueTestCases() { }, .expectedValuesToGet = { VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::SHUTDOWN_START)}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .status = VehiclePropertyStatus::AVAILABLE, .value.int32Values = {toInt(VehicleApPowerStateReq::FINISHED), 0}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::SHUTDOWN_START)}, }, }, }, SetSpecialValueTestCase{ Loading Loading @@ -915,7 +914,7 @@ TEST_P(FakeVehicleHardwareSpecialValuesTest, testSetSpecialProperties) { // Some of the updated properties might be the same as default config, thus not causing // a property change event. So the changed properties should be a subset of all the updated // properties. ASSERT_THAT(getChangedProperties(), WhenSortedBy(mPropValueCmp, IsSubsetOf(gotValues))); ASSERT_THAT(getChangedProperties(), WhenSortedBy(mPropValueCmp, Eq(gotValues))); } INSTANTIATE_TEST_SUITE_P( Loading Loading
audio/7.1/config/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -359,6 +359,7 @@ package android.audio.policy.configuration.V7_1 { enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_GAME; enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_MEDIA; enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_NOTIFICATION; enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_NOTIFICATION_EVENT; enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE; enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_SAFETY; enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_UNKNOWN; Loading
audio/7.1/config/audio_policy_configuration.xsd +1 −0 Original line number Diff line number Diff line Loading @@ -443,6 +443,7 @@ <xs:enumeration value="AUDIO_USAGE_ALARM" /> <xs:enumeration value="AUDIO_USAGE_NOTIFICATION" /> <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE" /> <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_EVENT" /> <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" /> <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" /> <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" /> Loading
audio/common/all-versions/default/7.0/HidlUtils.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -485,8 +485,12 @@ status_t HidlUtils::audioGainToHal(const AudioGain& gain, struct audio_gain* hal status_t HidlUtils::audioUsageFromHal(audio_usage_t halUsage, AudioUsage* usage) { if (halUsage == AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST || halUsage == AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT || #if MAJOR_VERSION == 7 && MINOR_VERSION == 1 halUsage == AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED) { #else halUsage == AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED || halUsage == AUDIO_USAGE_NOTIFICATION_EVENT) { #endif halUsage = AUDIO_USAGE_NOTIFICATION; } *usage = audio_usage_to_string(halUsage); Loading
automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h +1 −2 Original line number Diff line number Diff line Loading @@ -754,8 +754,7 @@ const std::vector<ConfigDeclaration> kVehicleProperties = { {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .configArray = {3}}, .initialValue = {.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}}}, .configArray = {3}}}, {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .access = VehiclePropertyAccess::READ_WRITE, Loading
automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp +36 −37 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ using ::android::base::unexpected; using ::testing::ContainerEq; using ::testing::ContainsRegex; using ::testing::Eq; using ::testing::IsSubsetOf; using ::testing::WhenSortedBy; constexpr int INVALID_PROP_ID = 0; Loading Loading @@ -634,17 +633,17 @@ std::vector<SetSpecialValueTestCase> setSpecialValueTestCases() { }, .expectedValuesToGet = { VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::DEEP_SLEEP_EXIT)}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .status = VehiclePropertyStatus::AVAILABLE, .value.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::DEEP_SLEEP_EXIT)}, }, }, }, SetSpecialValueTestCase{ Loading @@ -659,17 +658,17 @@ std::vector<SetSpecialValueTestCase> setSpecialValueTestCases() { }, .expectedValuesToGet = { VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::HIBERNATION_EXIT)}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .status = VehiclePropertyStatus::AVAILABLE, .value.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::HIBERNATION_EXIT)}, }, }, }, SetSpecialValueTestCase{ Loading @@ -684,17 +683,17 @@ std::vector<SetSpecialValueTestCase> setSpecialValueTestCases() { }, .expectedValuesToGet = { VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::SHUTDOWN_CANCELLED)}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .status = VehiclePropertyStatus::AVAILABLE, .value.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::SHUTDOWN_CANCELLED)}, }, }, }, SetSpecialValueTestCase{ Loading @@ -709,17 +708,17 @@ std::vector<SetSpecialValueTestCase> setSpecialValueTestCases() { }, .expectedValuesToGet = { VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::WAIT_FOR_VHAL)}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .status = VehiclePropertyStatus::AVAILABLE, .value.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::WAIT_FOR_VHAL)}, }, }, }, SetSpecialValueTestCase{ Loading @@ -734,17 +733,17 @@ std::vector<SetSpecialValueTestCase> setSpecialValueTestCases() { }, .expectedValuesToGet = { VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::DEEP_SLEEP_ENTRY)}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .status = VehiclePropertyStatus::AVAILABLE, .value.int32Values = {toInt(VehicleApPowerStateReq::FINISHED), 0}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::DEEP_SLEEP_ENTRY)}, }, }, }, SetSpecialValueTestCase{ Loading @@ -759,17 +758,17 @@ std::vector<SetSpecialValueTestCase> setSpecialValueTestCases() { }, .expectedValuesToGet = { VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::HIBERNATION_ENTRY)}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .status = VehiclePropertyStatus::AVAILABLE, .value.int32Values = {toInt(VehicleApPowerStateReq::FINISHED), 0}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::HIBERNATION_ENTRY)}, }, }, }, SetSpecialValueTestCase{ Loading @@ -784,17 +783,17 @@ std::vector<SetSpecialValueTestCase> setSpecialValueTestCases() { }, .expectedValuesToGet = { VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::SHUTDOWN_START)}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), .status = VehiclePropertyStatus::AVAILABLE, .value.int32Values = {toInt(VehicleApPowerStateReq::FINISHED), 0}, }, VehiclePropValue{ .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), .value.int32Values = {toInt( VehicleApPowerStateReport::SHUTDOWN_START)}, }, }, }, SetSpecialValueTestCase{ Loading Loading @@ -915,7 +914,7 @@ TEST_P(FakeVehicleHardwareSpecialValuesTest, testSetSpecialProperties) { // Some of the updated properties might be the same as default config, thus not causing // a property change event. So the changed properties should be a subset of all the updated // properties. ASSERT_THAT(getChangedProperties(), WhenSortedBy(mPropValueCmp, IsSubsetOf(gotValues))); ASSERT_THAT(getChangedProperties(), WhenSortedBy(mPropValueCmp, Eq(gotValues))); } INSTANTIATE_TEST_SUITE_P( Loading