Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5afd374 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8183382 from 45495012 to tm-d1-release

Change-Id: Id3495f9fad94c9e0b6f74d4fb84bb3f7f83aa095
parents fae8e320 45495012
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
+1 −0
Original line number Diff line number Diff line
@@ -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" />
+4 −0
Original line number Diff line number Diff line
@@ -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);
+1 −2
Original line number Diff line number Diff line
@@ -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,
+36 −37
Original line number Diff line number Diff line
@@ -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;
@@ -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{
@@ -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{
@@ -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{
@@ -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{
@@ -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{
@@ -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{
@@ -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{
@@ -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