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

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

Snap for 12763142 from 9ab096da to 25Q1-release

Change-Id: I7c6a59d3505c7883963d914097a0ebec50b38456
parents 7769e807 9ab096da
Loading
Loading
Loading
Loading
+12 −21
Original line number Diff line number Diff line
@@ -1049,23 +1049,6 @@ ndk::ScopedAStatus Module::setAudioPatch(const AudioPatch& in_requested, AudioPa
        return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
    }

    auto& patches = getConfig().patches;
    auto existing = patches.end();
    if (in_requested.id != 0) {
        existing = findById<AudioPatch>(patches, in_requested.id);
        if (existing == patches.end()) {
            LOG(ERROR) << __func__ << ": " << mType << ": not found existing patch id "
                       << in_requested.id;
            return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
        }
        if (in_requested == *existing) {
            LOG(INFO) << __func__ << ": " << mType
                      << ": requested patch has no changes compared to already existing one, id "
                      << in_requested.id;
            return ndk::ScopedAStatus::ok();
        }
    }

    auto& configs = getConfig().portConfigs;
    std::vector<int32_t> missingIds;
    auto sources =
@@ -1105,12 +1088,20 @@ ndk::ScopedAStatus Module::setAudioPatch(const AudioPatch& in_requested, AudioPa
    }
    RETURN_STATUS_IF_ERROR(checkAudioPatchEndpointsMatch(sources, sinks));

    auto& patches = getConfig().patches;
    auto existing = patches.end();
    std::optional<decltype(mPatches)> patchesBackup;
    if (in_requested.id != 0) {
        existing = findById<AudioPatch>(patches, in_requested.id);
        if (existing != patches.end()) {
            patchesBackup = mPatches;
            cleanUpPatch(existing->id);
        } else {
            LOG(ERROR) << __func__ << ": " << mType << ": not found existing patch id "
                       << in_requested.id;
            return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
        }
    }

    // Validate the requested patch.
    for (const auto& [sinkPortId, nonExclusive] : allowedSinkPorts) {
        if (!nonExclusive && mPatches.count(sinkPortId) != 0) {
+0 −55
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.automotive.vehicle;

import android.hardware.automotive.vehicle.RawPropValues;

/**
 * Represents the value range for a vehicle property.
 *
 * This applies for the values read from VHAL and the values sent to VHAL.
 *
 * If the value range differs, this is the super set.
 */
@VintfStability
@JavaDerive(equals=true, toString=true)
@RustDerive(Clone=true)
parcelable ValueRange {
    /**
     * The currently specified minimum value for the property.
     *
     * {@code null} if not specified.
     */
    @nullable RawPropValues minValue;

    /**
     * The currently specified maximum value for the property.
     *
     * {@code null} if not specified.
     */
    @nullable RawPropValues maxValue;

    /**
     * The currently specified supported values for the property.
     *
     * If the value type is int32, int64 or float, the returned list must be
     * sorted in ascending order.
     *
     * {@code null} if not specified.
     */
    @nullable List<RawPropValues> supportedValues;
}
+192 −1
Original line number Diff line number Diff line
@@ -92,6 +92,20 @@
                "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[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": "INFO_MODEL_TRIM",
                "value": 286261517,
                "description": "Public trim name of the vehicle.\nThis property must communicate the vehicle's public trim name.\nFor example, say an OEM manufactures two different versions of a vehicle model: \"makeName modelName\" and \"makeName modelName Sport\" This property must be empty for the first vehicle (i.e. base model), and set to \"Sport\" for the second vehicle."
            },
            {
                "name": "Vehicle Size Class.",
                "value": 289472782,
                "data_enums": [
                    "VehicleSizeClass"
                ],
                "data_enum": "VehicleSizeClass",
                "description": "Vehicle Size Class.\nThis property must communicate an integer array that contains the size classifications followed by the vehicle as enumerated in VehicleSizeClass.aidl. If the vehicle follows a single standard, then the array size of the property's value should be 1. If the vehicle follows multiple standards that the OEM wants to communicate, this may be communicated as additional values in the array.\nFor example, suppose a vehicle model follows the VehicleSizeClass.EU_A_SEGMENT standard in the EU and the VehicleSizeClass.JPN_KEI standard in Japan. In this scenario this property must return an intArray = [VehicleSizeClass.EU_A_SEGMENT, VehicleSizeClass.JPN_KEI]. If this vehicle only followed the VehicleSizeClass.EU_A_SEGMENT standard, then we expect intArray = [VehicleSizeClass.EU_A_SEGMENT]."
            },
            {
                "name": "PERF_ODOMETER",
                "value": 291504644,
@@ -117,6 +131,11 @@
                "value": 291504656,
                "description": "Rear bicycle model steering angle for vehicle\nAngle is in degrees.  Left is negative.\nThis property is independent of the angle of the steering wheel. This property must communicate the angle of the rear wheels with respect to the vehicle, not the angle of the steering wheel."
            },
            {
                "name": "INSTANTANEOUS_FUEL_ECONOMY",
                "value": 291504657,
                "description": "Instantaneous Fuel Economy in L\/100km.\nThis property must communicate the instantaneous fuel economy of the vehicle in units of L\/100km. The property's value is independent of DISTANCE_DISPLAY_UNITS, FUEL_VOLUME_DISPLAY_UNITS, and FUEL_CONSUMPTION_UNITS_DISTANCE_OVER_VOLUME property i.e. this property must always communicate the value in L\/100km.\nFor the EV version of this property, see INSTANTANEOUS_EV_EFFICIENCY."
            },
            {
                "name": "Temperature of engine coolant",
                "value": 291504897,
@@ -265,7 +284,7 @@
                    "VehicleTurnSignal"
                ],
                "data_enum": "VehicleTurnSignal",
                "description": "State of the vehicles turn signals"
                "description": "(Deprecated) State of the vehicles turn signals\nThis property has been deprecated as it ambiguously defines the state of the vehicle turn signals without making clear if it means the state of the turn signal lights or the state of the turn signal switch. The introduction of TURN_SIGNAL_LIGHT_STATE and TURN_SIGNAL_SWITCH rectifies this problem."
            },
            {
                "name": "Represents ignition state",
@@ -310,6 +329,24 @@
                "data_enum": "ElectronicStabilityControlState",
                "description": "Electronic Stability Control (ESC) state.\nReturns the current state of ESC. This property must always return a valid state defined in ElectronicStabilityControlState or ErrorState. It must not surface errors through StatusCode and must use the supported error states instead.\nFor the global area ID (0), {@code getSupportedValuesList} must return a {@code SupportedValuesListResult} that contains supported values unless all states of both ElectronicStabilityControlState (including OTHER, which is not recommended) and ErrorState are supported.\nFor backward compatibility, if {@code SupportedValuesListResult} is defined, {@code VehicleAreaConfig#supportedEnumValues} must be set to the same values."
            },
            {
                "name": "Turn signal light state.",
                "value": 289408016,
                "data_enums": [
                    "VehicleTurnSignal"
                ],
                "data_enum": "VehicleTurnSignal",
                "description": "Turn signal light state.\nThis property must communicate the actual state of the turn signal lights.\nExamples: 1) Left turn signal light is currently pulsing, right turn signal light is currently off. This property must return VehicleTurnSignal.LEFT while the light is on during the pulse, and VehicleTurnSignal.NONE when it is off during the pulse. 2) Right turn signal light is currently pulsing, left turn signal light is currently off. This property must return VehicleTurnSignal.RIGHT while the light is on during the pulse, and VehicleTurnSignal.NONE when it is off during the pulse. 3) Both turn signal lights are currently pulsing (e.g. when hazard lights switch is on). This property must return VehicleTurnSignal.LEFT | VehicleTurnSignal.RIGHT while the lights are on during the pulse, and VehicleTurnSignal.NONE when they are off during the pulse.\nNote that this property uses VehicleTurnSignal as a bit flag, unlike TURN_SIGNAL_SWITCH, which uses it like a regular enum. This means this property can support ORed together values in VehicleTurnSignal.\nThis is different from the function of TURN_SIGNAL_SWITCH, which must communicate the state of the turn signal lever\/switch.\nThis property is a replacement to the TURN_SIGNAL_STATE property, which is now deprecated."
            },
            {
                "name": "Turn signal switch.",
                "value": 289408017,
                "data_enums": [
                    "VehicleTurnSignal"
                ],
                "data_enum": "VehicleTurnSignal",
                "description": "Turn signal switch.\nThis property must communicate the state of the turn signal lever\/switch. This is different from the function of TURN_SIGNAL_LIGHT_STATE, which must communicate the actual state of the turn signal lights.\nNote that this property uses VehicleTurnSignal as a regular enum, unlike TURN_SIGNAL_LIGHT_STATE, which uses it like a bit flag. This means this property cannot support ORed together values in VehicleTurnSignal.\nThis property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to implement it as VehiclePropertyAccess.READ only."
            },
            {
                "name": "Fan speed setting",
                "value": 356517120,
@@ -2195,6 +2232,14 @@
                "name": "GBT_DC",
                "value": 11
            },
            {
                "name": "SAE_J3400_AC",
                "value": 8
            },
            {
                "name": "SAE_J3400_DC",
                "value": 9
            },
            {
                "name": "OTHER",
                "value": 101
@@ -2953,6 +2998,152 @@
            }
        ]
    },
    {
        "name": "VehicleSizeClass",
        "package": "android.hardware.automotive.vehicle",
        "values": [
            {
                "name": "EPA_TWO_SEATER",
                "value": 256
            },
            {
                "name": "EPA_MINICOMPACT",
                "value": 257
            },
            {
                "name": "EPA_SUBCOMPACT",
                "value": 258
            },
            {
                "name": "EPA_COMPACT",
                "value": 259
            },
            {
                "name": "EPA_MIDSIZE",
                "value": 260
            },
            {
                "name": "EPA_LARGE",
                "value": 261
            },
            {
                "name": "EPA_SMALL_STATION_WAGON",
                "value": 262
            },
            {
                "name": "EPA_MIDSIZE_STATION_WAGON",
                "value": 263
            },
            {
                "name": "EPA_LARGE_STATION_WAGON",
                "value": 264
            },
            {
                "name": "EPA_SMALL_PICKUP_TRUCK",
                "value": 265
            },
            {
                "name": "EPA_STANDARD_PICKUP_TRUCK",
                "value": 266
            },
            {
                "name": "EPA_VAN",
                "value": 267
            },
            {
                "name": "EPA_MINIVAN",
                "value": 268
            },
            {
                "name": "EPA_SMALL_SUV",
                "value": 269
            },
            {
                "name": "EPA_STANDARD_SUV",
                "value": 270
            },
            {
                "name": "EU_A_SEGMENT",
                "value": 512
            },
            {
                "name": "EU_B_SEGMENT",
                "value": 513
            },
            {
                "name": "EU_C_SEGMENT",
                "value": 514
            },
            {
                "name": "EU_D_SEGMENT",
                "value": 515
            },
            {
                "name": "EU_E_SEGMENT",
                "value": 516
            },
            {
                "name": "EU_F_SEGMENT",
                "value": 517
            },
            {
                "name": "EU_J_SEGMENT",
                "value": 518
            },
            {
                "name": "EU_M_SEGMENT",
                "value": 519
            },
            {
                "name": "EU_S_SEGMENT",
                "value": 520
            },
            {
                "name": "JPN_KEI",
                "value": 768
            },
            {
                "name": "JPN_SMALL_SIZE",
                "value": 769
            },
            {
                "name": "JPN_NORMAL_SIZE",
                "value": 770
            },
            {
                "name": "US_GVWR_CLASS_1_CV",
                "value": 1024
            },
            {
                "name": "US_GVWR_CLASS_2_CV",
                "value": 1025
            },
            {
                "name": "US_GVWR_CLASS_3_CV",
                "value": 1026
            },
            {
                "name": "US_GVWR_CLASS_4_CV",
                "value": 1027
            },
            {
                "name": "US_GVWR_CLASS_5_CV",
                "value": 1028
            },
            {
                "name": "US_GVWR_CLASS_6_CV",
                "value": 1029
            },
            {
                "name": "US_GVWR_CLASS_7_CV",
                "value": 1030
            },
            {
                "name": "US_GVWR_CLASS_8_CV",
                "value": 1031
            }
        ]
    },
    {
        "name": "VehicleTurnSignal",
        "package": "android.hardware.automotive.vehicle",
+5 −0
Original line number Diff line number Diff line
@@ -49,11 +49,14 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
        {VehicleProperty::INFO_DRIVER_SEAT, VehiclePropertyAccess::READ},
        {VehicleProperty::INFO_EXTERIOR_DIMENSIONS, VehiclePropertyAccess::READ},
        {VehicleProperty::INFO_MULTI_EV_PORT_LOCATIONS, VehiclePropertyAccess::READ},
        {VehicleProperty::INFO_MODEL_TRIM, VehiclePropertyAccess::READ},
        {VehicleProperty::INFO_VEHICLE_SIZE_CLASS, VehiclePropertyAccess::READ},
        {VehicleProperty::PERF_ODOMETER, VehiclePropertyAccess::READ},
        {VehicleProperty::PERF_VEHICLE_SPEED, VehiclePropertyAccess::READ},
        {VehicleProperty::PERF_VEHICLE_SPEED_DISPLAY, VehiclePropertyAccess::READ},
        {VehicleProperty::PERF_STEERING_ANGLE, VehiclePropertyAccess::READ},
        {VehicleProperty::PERF_REAR_STEERING_ANGLE, VehiclePropertyAccess::READ},
        {VehicleProperty::INSTANTANEOUS_FUEL_ECONOMY, VehiclePropertyAccess::READ},
        {VehicleProperty::ENGINE_COOLANT_TEMP, VehiclePropertyAccess::READ},
        {VehicleProperty::ENGINE_OIL_LEVEL, VehiclePropertyAccess::READ},
        {VehicleProperty::ENGINE_OIL_TEMP, VehiclePropertyAccess::READ},
@@ -86,6 +89,8 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
        {VehicleProperty::EV_STOPPING_MODE, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::ELECTRONIC_STABILITY_CONTROL_ENABLED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::ELECTRONIC_STABILITY_CONTROL_STATE, VehiclePropertyAccess::READ},
        {VehicleProperty::TURN_SIGNAL_LIGHT_STATE, VehiclePropertyAccess::READ},
        {VehicleProperty::TURN_SIGNAL_SWITCH, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::HVAC_FAN_SPEED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::HVAC_FAN_DIRECTION, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::HVAC_TEMPERATURE_CURRENT, VehiclePropertyAccess::READ},
+5 −0
Original line number Diff line number Diff line
@@ -49,11 +49,14 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
        {VehicleProperty::INFO_DRIVER_SEAT, VehiclePropertyChangeMode::STATIC},
        {VehicleProperty::INFO_EXTERIOR_DIMENSIONS, VehiclePropertyChangeMode::STATIC},
        {VehicleProperty::INFO_MULTI_EV_PORT_LOCATIONS, VehiclePropertyChangeMode::STATIC},
        {VehicleProperty::INFO_MODEL_TRIM, VehiclePropertyChangeMode::STATIC},
        {VehicleProperty::INFO_VEHICLE_SIZE_CLASS, VehiclePropertyChangeMode::STATIC},
        {VehicleProperty::PERF_ODOMETER, VehiclePropertyChangeMode::CONTINUOUS},
        {VehicleProperty::PERF_VEHICLE_SPEED, VehiclePropertyChangeMode::CONTINUOUS},
        {VehicleProperty::PERF_VEHICLE_SPEED_DISPLAY, VehiclePropertyChangeMode::CONTINUOUS},
        {VehicleProperty::PERF_STEERING_ANGLE, VehiclePropertyChangeMode::CONTINUOUS},
        {VehicleProperty::PERF_REAR_STEERING_ANGLE, VehiclePropertyChangeMode::CONTINUOUS},
        {VehicleProperty::INSTANTANEOUS_FUEL_ECONOMY, VehiclePropertyChangeMode::CONTINUOUS},
        {VehicleProperty::ENGINE_COOLANT_TEMP, VehiclePropertyChangeMode::CONTINUOUS},
        {VehicleProperty::ENGINE_OIL_LEVEL, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::ENGINE_OIL_TEMP, VehiclePropertyChangeMode::CONTINUOUS},
@@ -86,6 +89,8 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
        {VehicleProperty::EV_STOPPING_MODE, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::ELECTRONIC_STABILITY_CONTROL_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::ELECTRONIC_STABILITY_CONTROL_STATE, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::TURN_SIGNAL_LIGHT_STATE, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::TURN_SIGNAL_SWITCH, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::HVAC_FAN_SPEED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::HVAC_FAN_DIRECTION, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::HVAC_TEMPERATURE_CURRENT, VehiclePropertyChangeMode::ON_CHANGE},
Loading