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

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

Snap for 11685790 from 2b3e7417 to 24Q3-release

Change-Id: Ieb2f4b150d81b31ed39e3844f01c088c961fb4b3
parents 84f50779 2b3e7417
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@
                    "PortLocationType"
                ],
                "data_enum": "PortLocationType",
                "description": "EV port location"
                "description": "EV port location\nThis property must communicate the location of the charging port on the EV using the PortLocationType enum. If there are multiple ports available on the vehicle, this property must return the port that allows the fastest charging. To communicate all port locations, use INFO_MULTI_EV_PORT_LOCATIONS."
            },
            {
                "name": "INFO_DRIVER_SEAT",
@@ -90,7 +90,7 @@
                    "PortLocationType"
                ],
                "data_enum": "PortLocationType",
                "description": "Multiple EV port locations\nImplement this property if the vehicle has multiple EV ports. Port locations are defined in PortLocationType. For example, a car has one port in front left and one port in rear left: int32Values[0] = PortLocationType::FRONT_LEFT int32Values[0] = PortLocationType::REAR_LEFT"
                "description": "Multiple EV port locations\nImplement this property if the vehicle has multiple EV ports. Port locations are defined in PortLocationType. For example, a car has one port in front left and one port in rear left: int32Values[0] = PortLocationType::FRONT_LEFT int32Values[1] = PortLocationType::REAR_LEFT\nIf only one port exists on the vehicle, this property's value should list just one element. See INFO_EV_PORT_LOCATION for describing just one port location."
            },
            {
                "name": "PERF_ODOMETER",
+9 −1
Original line number Diff line number Diff line
@@ -170,6 +170,11 @@ enum VehicleProperty {
    /**
     * EV port location
     *
     * This property must communicate the location of the charging port on the EV using the
     * PortLocationType enum. If there are multiple ports available on the vehicle, this property
     * must return the port that allows the fastest charging. To communicate all port locations,
     * use INFO_MULTI_EV_PORT_LOCATIONS.
     *
     * @change_mode VehiclePropertyChangeMode.STATIC
     * @access VehiclePropertyAccess.READ
     * @data_enum PortLocationType
@@ -214,7 +219,10 @@ enum VehicleProperty {
     * Port locations are defined in PortLocationType.
     * For example, a car has one port in front left and one port in rear left:
     *   int32Values[0] = PortLocationType::FRONT_LEFT
     *   int32Values[0] = PortLocationType::REAR_LEFT
     *   int32Values[1] = PortLocationType::REAR_LEFT
     *
     * If only one port exists on the vehicle, this property's value should list just one element.
     * See INFO_EV_PORT_LOCATION for describing just one port location.
     *
     * @change_mode VehiclePropertyChangeMode.STATIC
     * @access VehiclePropertyAccess.READ
+6 −5
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ class BroadcastRadioHalTest : public testing::TestWithParam<std::string> {

MATCHER_P(InfoHasId, id,
          std::string(negation ? "does not contain" : "contains") + " " + id.toString()) {
    vector<int> ids = bcutils::getAllIds(arg.selector, id.type);
    vector<int64_t> ids = bcutils::getAllIds(arg.selector, id.type);
    return ids.end() != find(ids.begin(), ids.end(), id.value);
}

@@ -697,7 +697,7 @@ TEST_P(BroadcastRadioHalTest, FmTune) {
    LOG(DEBUG) << "Current program info: " << infoCb.toString();

    // it should tune exactly to what was requested
    vector<int> freqs = bcutils::getAllIds(infoCb.selector, IdentifierType::AMFM_FREQUENCY_KHZ);
    vector<int64_t> freqs = bcutils::getAllIds(infoCb.selector, IdentifierType::AMFM_FREQUENCY_KHZ);
    EXPECT_NE(freqs.end(), find(freqs.begin(), freqs.end(), freq))
            << "FM freq " << freq << " kHz is not sent back by callback.";
}
@@ -829,7 +829,7 @@ TEST_P(BroadcastRadioHalTest, DabTune) {
    LOG(DEBUG) << "Current program info: " << infoCb.toString();

    // it should tune exactly to what was requested
    vector<int> freqs = bcutils::getAllIds(infoCb.selector, IdentifierType::DAB_FREQUENCY_KHZ);
    vector<int64_t> freqs = bcutils::getAllIds(infoCb.selector, IdentifierType::DAB_FREQUENCY_KHZ);
    EXPECT_NE(freqs.end(), find(freqs.begin(), freqs.end(), freq))
            << "DAB freq " << freq << " kHz is not sent back by callback.";
}
@@ -1152,7 +1152,7 @@ TEST_P(BroadcastRadioHalTest, GetProgramListFromAmFmFilter) {
    int expectedResultSize = 0;
    uint64_t expectedFreq = 0;
    for (const auto& program : *completeList) {
        vector<int> amfmIds =
        vector<int64_t> amfmIds =
                bcutils::getAllIds(program.selector, IdentifierType::AMFM_FREQUENCY_KHZ);
        EXPECT_LE(amfmIds.size(), 1u);
        if (amfmIds.size() == 0) {
@@ -1238,7 +1238,8 @@ TEST_P(BroadcastRadioHalTest, HdRadioStationNameId) {
    }

    for (const auto& program : *list) {
        vector<int> nameIds = bcutils::getAllIds(program.selector, IdentifierType::HD_STATION_NAME);
        vector<int64_t> nameIds =
                bcutils::getAllIds(program.selector, IdentifierType::HD_STATION_NAME);
        EXPECT_LE(nameIds.size(), 1u);
        if (nameIds.size() == 0) {
            continue;
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ int64_t getId(const ProgramSelector& sel, const IdentifierType& type, int64_t de
/**
 * Returns all IDs of a given type.
 */
std::vector<int> getAllIds(const ProgramSelector& sel, const IdentifierType& type);
std::vector<int64_t> getAllIds(const ProgramSelector& sel, const IdentifierType& type);

/**
 * Checks, if a given selector is supported by the radio module.
+2 −2
Original line number Diff line number Diff line
@@ -178,8 +178,8 @@ int64_t getId(const ProgramSelector& sel, const IdentifierType& type, int64_t de
    return getId(sel, type);
}

vector<int> getAllIds(const ProgramSelector& sel, const IdentifierType& type) {
    vector<int> ret;
vector<int64_t> getAllIds(const ProgramSelector& sel, const IdentifierType& type) {
    vector<int64_t> ret;

    // iterate through primaryId and secondaryIds
    for (auto it = begin(sel); it != end(sel); it++) {
Loading