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

Commit 7eaecec7 authored by shrikar's avatar shrikar
Browse files

Added INFO_VEHICLE_SIZE_CLASS to HAL

Bug: 374759562
Test: atest VtsHalAutomotiveVehicle_TargetTest
Change-Id: I7cf17e3664dfa31e46420a197e17fd120f335939
parent f02d6754
Loading
Loading
Loading
Loading
+155 −0
Original line number Diff line number Diff line
@@ -97,6 +97,15 @@
                "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,
@@ -2958,6 +2967,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",
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
        {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},
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
        {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},
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ std::unordered_map<VehicleProperty, int32_t> VersionForVehicleProperty = {
        {VehicleProperty::INFO_EXTERIOR_DIMENSIONS, 2},
        {VehicleProperty::INFO_MULTI_EV_PORT_LOCATIONS, 2},
        {VehicleProperty::INFO_MODEL_TRIM, 4},
        {VehicleProperty::INFO_VEHICLE_SIZE_CLASS, 4},
        {VehicleProperty::PERF_ODOMETER, 2},
        {VehicleProperty::PERF_VEHICLE_SPEED, 2},
        {VehicleProperty::PERF_VEHICLE_SPEED_DISPLAY, 2},
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ public final class AccessForVehicleProperty {
        Map.entry(VehicleProperty.INFO_EXTERIOR_DIMENSIONS, VehiclePropertyAccess.READ),
        Map.entry(VehicleProperty.INFO_MULTI_EV_PORT_LOCATIONS, VehiclePropertyAccess.READ),
        Map.entry(VehicleProperty.INFO_MODEL_TRIM, VehiclePropertyAccess.READ),
        Map.entry(VehicleProperty.INFO_VEHICLE_SIZE_CLASS, VehiclePropertyAccess.READ),
        Map.entry(VehicleProperty.PERF_ODOMETER, VehiclePropertyAccess.READ),
        Map.entry(VehicleProperty.PERF_VEHICLE_SPEED, VehiclePropertyAccess.READ),
        Map.entry(VehicleProperty.PERF_VEHICLE_SPEED_DISPLAY, VehiclePropertyAccess.READ),
Loading